fix: postchecks fix, added validation to target type

btw small refactoring
This commit is contained in:
ITQ committed 2025-01-29 19:22:02 +03:00
1 parent 9f3a08d39d
commit 2cb8f81cb1
3 files changed
+25 -8

No files matched your search

+1 -3
View File
@@ -170,9 +170,7 @@ def feed(
category_lower = filters.category.lower()
def matches_category(promocode: Promocode) -> bool:
categories = (
promocode.target.categories or []
)
categories = promocode.target.categories or []
return any(
category.lower() == category_lower for category in categories
)