Store pdf in result, also store manifest

- since multiple vouchers yield one PDF, storing it directly in the
  result object makes more sense
- the manifest is also available when buying PDFs, thus retrieve it as
  well
This commit is contained in:
Georg Sauthoff 2016-09-26 16:02:01 +02:00
parent af78ec1c53
commit a013f6c4c6
1 changed files with 3 additions and 1 deletions

View File

@ -128,7 +128,9 @@ class Internetmarke(object):
_logger.info("PDF checkout result: %s", r)
if r.link:
pdf = requests.get(r.link, stream=True)
r.shoppingCart.voucherList.voucher[0].pdf_bin = pdf.content
r.pdf_bin = pdf.content
if r.manifestLink:
r.manifest_pdf_bin = self.retrieve_manifest(r.manifestLink)
return r
def checkoutPNG(self):