fix: postchecks fix, added validation to target type

btw small refactoring
This commit is contained in:
ITQ
2025-01-29 19:22:02 +03:00
parent 9f3a08d39d
commit 2cb8f81cb1
3 changed files with 25 additions and 8 deletions
+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
)