You've already forked Promocode-API
mirror of
https://github.com/devitq/Promocode-API.git
synced 2026-05-23 00:27:12 +00:00
fix: postchecks fix, added validation to target type
btw small refactoring
This commit is contained in:
@@ -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
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user