Move all the APIs under the same router
This commit is contained in:
parent
3d46cb5ec9
commit
c54ceeb7a8
27 changed files with 1289 additions and 351 deletions
|
|
@ -801,6 +801,10 @@ class DropCampaign(auto_prefetch.Model): # noqa: PLR0904
|
|||
queryset = queryset.filter(start_at__gt=now)
|
||||
elif status == "expired":
|
||||
queryset = queryset.filter(end_at__lt=now)
|
||||
elif status == "unknown":
|
||||
queryset = queryset.filter(
|
||||
Q(start_at__isnull=True) | Q(end_at__isnull=True),
|
||||
)
|
||||
return queryset
|
||||
|
||||
@classmethod
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue