Add is_fully_imported field to DropCampaign and KickDropCampaign models; update views and commands to filter by this field
All checks were successful
Deploy to Server / deploy (push) Successful in 18s
All checks were successful
Deploy to Server / deploy (push) Successful in 18s
This commit is contained in:
parent
5d56a936b0
commit
a8747791c0
12 changed files with 242 additions and 13 deletions
|
|
@ -155,7 +155,7 @@ def dashboard(request: HttpRequest) -> HttpResponse:
|
|||
now: datetime.datetime = timezone.now()
|
||||
active_campaigns: QuerySet[KickDropCampaign] = (
|
||||
KickDropCampaign.objects
|
||||
.filter(starts_at__lte=now, ends_at__gte=now)
|
||||
.filter(starts_at__lte=now, ends_at__gte=now, is_fully_imported=True)
|
||||
.select_related("organization", "category")
|
||||
.prefetch_related("channels__user", "rewards")
|
||||
.order_by("-starts_at")
|
||||
|
|
@ -193,6 +193,7 @@ def campaign_list_view(request: HttpRequest) -> HttpResponse:
|
|||
|
||||
queryset: QuerySet[KickDropCampaign] = (
|
||||
KickDropCampaign.objects
|
||||
.filter(is_fully_imported=True)
|
||||
.select_related("organization", "category")
|
||||
.prefetch_related("rewards")
|
||||
.order_by("-starts_at")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue