Skip to content

Commit

Permalink
Merge pull request #1227 from gtech-mulearn/dev-server
Browse files Browse the repository at this point in the history
cp issue
  • Loading branch information
adnankattekaden authored Oct 7, 2023
2 parents 43149a7 + 4a3935b commit 973936f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions api/dashboard/campus/campus_views.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
from django.db.models import Count, Q, F, Case, When, Value
from django.db.models import Sum
from django.db.models.functions import Coalesce
from rest_framework.views import APIView

from db.task import Level, Wallet
Expand Down Expand Up @@ -120,7 +118,8 @@ def get(self, request):
level=F("user_lvl_link_user__level__name"),
join_date=F("created_at"),
is_active=Case(
When(Q(karma_activity_log_user__created_at__range=(start_date, end_date)), then=Value("Active")),
When(Q(karma_activity_log_user__created_at__range=(start_date, end_date),
karma_activity_log_user__user=F("id")), then=Value("Active")),
default=Value("Not Active")
)
))
Expand Down

0 comments on commit 973936f

Please sign in to comment.