mirror of
https://github.com/lemeow125/DRF_Template.git
synced 2025-06-29 08:35:44 +08:00
Clean up docker-compose and run Black formatter over entire codebase
This commit is contained in:
parent
6c232b3e89
commit
069aba80b1
60 changed files with 1946 additions and 1485 deletions
|
@ -12,10 +12,10 @@ def get_user_subscription(user_id):
|
|||
active_subscriptions = None
|
||||
if USER.user_group:
|
||||
active_subscriptions = UserSubscription.objects.filter(
|
||||
user_group=USER.user_group, valid=True)
|
||||
user_group=USER.user_group, valid=True
|
||||
)
|
||||
else:
|
||||
active_subscriptions = UserSubscription.objects.filter(
|
||||
user=USER, valid=True)
|
||||
active_subscriptions = UserSubscription.objects.filter(user=USER, valid=True)
|
||||
|
||||
# Return first valid subscription if there is one
|
||||
if len(active_subscriptions) > 0:
|
||||
|
@ -33,7 +33,8 @@ def get_user_group_subscription(user_group):
|
|||
# Get a list of subscriptions for the specified user
|
||||
active_subscriptions = None
|
||||
active_subscriptions = UserSubscription.objects.filter(
|
||||
user_group=USER_GROUP, valid=True)
|
||||
user_group=USER_GROUP, valid=True
|
||||
)
|
||||
|
||||
# Return first valid subscription if there is one
|
||||
if len(active_subscriptions) > 0:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue