mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-09 19:40:19 +00:00
fix access to the subscription page
This commit is contained in:
@ -530,10 +530,8 @@ class User(AbstractBaseUser):
|
||||
|
||||
@cached_property
|
||||
def can_create_subscription(self) -> bool:
|
||||
from club.models import Membership
|
||||
|
||||
return (
|
||||
Membership.objects.board()
|
||||
return self.is_root or (
|
||||
self.memberships.board()
|
||||
.ongoing()
|
||||
.filter(club_id__in=settings.SITH_CAN_CREATE_SUBSCRIPTIONS)
|
||||
.exists()
|
||||
|
Reference in New Issue
Block a user