Skip to content

Commit

Permalink
Fixed event create (#446)
Browse files Browse the repository at this point in the history
  • Loading branch information
michalmasrna1 authored Nov 23, 2024
1 parent 67e975f commit 5261529
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion competition/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ def can_user_modify(self, user):

@classmethod
def can_user_create(cls, user: User, data: dict) -> bool:
competition = Competition.objects.get(pk=data['competition'])
competition = Competition.objects.get(pk=data['competition'].id)
return competition.can_user_modify(user)

def can_user_participate(self, user):
Expand Down

0 comments on commit 5261529

Please sign in to comment.