Use audience->thema in legimi too.
[redakcja.git] / src / depot / publishers / woblink.py
index 4cbc89e..e98ec58 100644 (file)
@@ -220,6 +220,12 @@ class Woblink(BasePublisher):
             if errors is not None:
                 errors.append(NoMainThemaWarning())
         thema_codes.extend(meta.thema)
+
+        thema_codes.extend(
+            Audience.objects.filter(code__in=meta.audiences).exclude(
+                thema=None).values_list('thema', flat=True)
+        )
+
         if not thema_codes:
             if errors is not None:
                 errors.append(NoThema())