From: Radek Czajka Date: Thu, 24 Aug 2023 10:27:50 +0000 (+0200) Subject: Use thema from audience. X-Git-Url: https://git.mdrn.pl/redakcja.git/commitdiff_plain/a01c8d6aa976110336c8073e56faf3f16f272ed8?ds=sidebyside;hp=54612c196135c939a7d17d51b81b1357f6eac9c3 Use thema from audience. --- diff --git a/src/depot/publishers/woblink.py b/src/depot/publishers/woblink.py index 4cbc89eb..e98ec585 100644 --- a/src/depot/publishers/woblink.py +++ b/src/depot/publishers/woblink.py @@ -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())