Skip to content

Commit

Permalink
debug ۳
Browse files Browse the repository at this point in the history
  • Loading branch information
Javad-Ak committed Sep 21, 2024
1 parent 78bdb92 commit 3f4b81c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions user/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ def get_payment_state(self):
query = core_models.EventService.objects.filter(**args)
if query.exists():
return "COMPLETED"
else:
return "PENDING"

return "PENDING"

def member_count(self):
return self.members.count()
Expand Down
4 changes: 2 additions & 2 deletions user/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -469,11 +469,11 @@ def enroll(self, request):

user = request.user
team = request.user.team
if not team or team.state != 'AC':
if not team or team.state != 'AC' or team.members.count() < 2 or team.members.count() > 5:
return self.set_response(
error=f"this team is not accepted",
status=406,
message=TEAM_NOT_ACCEPTED,
message="تیم مورد قبول نیست!",
status_code=status.HTTP_406_NOT_ACCEPTABLE,
)
if competition.get_remain_capacity() < team.members.count():
Expand Down

0 comments on commit 3f4b81c

Please sign in to comment.