Fundraising in PDF.
[wolnelektury.git] / src / isbn / management / commands / export_onix.py
index a78e882..f66415f 100644 (file)
@@ -1,3 +1,7 @@
+# This file is part of Wolne Lektury, licensed under GNU Affero GPLv3 or later.
+# Copyright © Fundacja Wolne Lektury. See NOTICE for more information.
+#
+import json
 from django.core.management.base import BaseCommand
 from django.utils import timezone
 
@@ -123,7 +127,7 @@ class Command(BaseCommand):
         else:
             part_number = ''
         contributors = ''
-        for no, contributor in enumerate(record.contributors, start=1):
+        for no, contributor in enumerate(json.loads(record.contributors), start=1):
             contributors += self.render_contributor(no, contributor)
         return PRODUCT % {
             'datestamp': record.datestamp.strftime('%Y%m%d'),