fix
[redakcja.git] / src / depot / publishers / woblink.py
index 0cd7a89..4d14741 100644 (file)
@@ -187,6 +187,7 @@ class Woblink(BasePublisher):
                 (self.ROLE_TRANSLATOR, meta.translators, False)
         ]:
             for person_literal in items:
+                if person_literal is None: continue
                 if person_literal.lang != 'pl':
                     if errors is not None:
                         if obligatory:
@@ -293,7 +294,7 @@ class Woblink(BasePublisher):
         }
 
     def get_lang2code(self, meta, errors=None):
-        return lang_code_3to2(meta.language)
+        return lang_code_3to2(meta.language or '')
 
     def get_price(self, site, wldoc, errors=None):
         try:
@@ -332,6 +333,12 @@ class Woblink(BasePublisher):
                 errlist = d['warnings']
             errlist.append(error.as_html())
 
+        if book_data.get('isbn'):
+            d['info'].append(format_html(
+                'ISBN: {isbn}',
+                isbn=book_data['isbn'],
+            ))
+
         if book_data.get('genres'):
             d['info'].append(format_html(
                 'W kategoriach: {cat} ({price} zł)',