You've already forked Promocode-API
mirror of
https://github.com/devitq/Promocode-API.git
synced 2026-05-22 20:57:11 +00:00
fix: fixed feed endpoint
This commit is contained in:
@@ -161,10 +161,12 @@ def feed(
|
||||
Q(target__categories__icontains=category_lower)
|
||||
)
|
||||
|
||||
promocodes = promocodes.all()
|
||||
|
||||
if filters.active is not None:
|
||||
promocodes = [p for p in promocodes if p.active == filters.active]
|
||||
|
||||
response["X-Total-Count"] = promocodes.count()
|
||||
response["X-Total-Count"] = len(promocodes)
|
||||
|
||||
promocodes = promocodes[filters.offset : filters.offset + filters.limit]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user