Skip to content

Commit

Permalink
Merge pull request #1531 from gtech-mulearn:dev
Browse files Browse the repository at this point in the history
[FEAT] Remove active column
  • Loading branch information
MZaFaRM authored Nov 6, 2023
2 parents 4f0793c + 5f5b9f3 commit 3d45060
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 6 deletions.
1 change: 0 additions & 1 deletion api/dashboard/campus/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ def get_active_members(self, obj):
last_month = DateTimeUtils.get_current_utc_time() - timedelta(days=30)
return obj.org.user_organization_link_org.filter(
verified=True,
user__active=True,
user__wallet_user__isnull=False,
user__wallet_user__created_at__gte=last_month,
).count()
Expand Down
3 changes: 0 additions & 3 deletions api/leaderboard/leaderboard_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ def get(self, request):
user_organization_link_user__org__org_type=OrganizationType.COLLEGE.value,
user_role_link_user__role__title=RoleType.STUDENT.value,
exist_in_guild=True,
active=True,
)
.distinct()
.select_related("wallet_user")
Expand Down Expand Up @@ -49,7 +48,6 @@ def get(self, request):
user_role_link_user__role__title=RoleType.STUDENT.value,
user_organization_link_user__org__org_type=OrganizationType.COLLEGE.value,
exist_in_guild=True,
active=True,
)
.annotate(
full_name=Concat(F("first_name"), Value(" "), F("last_name")),
Expand Down Expand Up @@ -86,7 +84,6 @@ def get(self, request):
Organization.objects.filter(
org_type=OrganizationType.COLLEGE.value,
user_organization_link_org__user__user_role_link_user__role__title=RoleType.STUDENT.value,
user_organization_link_org__user__active=True,
user_organization_link_org__user__exist_in_guild=True,
)
.distinct()
Expand Down
1 change: 0 additions & 1 deletion api/leaderboard/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ def get_active_members(self, obj):
last_month = DateTimeUtils.get_current_utc_time() - timedelta(days=30)
return obj.org.user_organization_link_org.filter(
verified=True,
user__active=True,
user__wallet_user__isnull=False,
user__wallet_user__created_at__gte=last_month,
).count()
Expand Down
1 change: 0 additions & 1 deletion db/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ class User(models.Model):
gender = models.CharField(max_length=10, blank=True, null=True, choices=[("Male", "Male"),("Female", "Female")])
dob = models.DateField(blank=True, null=True)
admin = models.BooleanField(default=False)
active = models.BooleanField(default=True)
exist_in_guild = models.BooleanField(default=False)
profile_pic = models.CharField(max_length=200, blank=True, null=True)
district = models.ForeignKey("District", on_delete=models.CASCADE, blank=True, null=True)
Expand Down

0 comments on commit 3d45060

Please sign in to comment.