Skip to content

Commit

Permalink
Merge pull request #524 from opengisch/active_should_be_current
Browse files Browse the repository at this point in the history
  • Loading branch information
suricactus authored Feb 20, 2023
2 parents 962621d + cb60477 commit 9d078ea
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions docker-app/qfieldcloud/subscription/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,11 @@ class Package(models.Model):

class SubscriptionQuerySet(models.QuerySet):
def active(self):
"""Returns the subscriptions which are relevant to the current moment.
WARNING the name `active` is super misleading, should be `current`. Some of the subscriptions in the queryset might not be active, but cancelled or drafted.
TODO rename to `current`
"""
now = timezone.now()
qs = self.filter(
Q(active_since__lte=now)
Expand Down

0 comments on commit 9d078ea

Please sign in to comment.