Skip to content
Snippets Groups Projects
Commit 2afeeca6 authored by Tom Teichler's avatar Tom Teichler :beers:
Browse files

Check if Registration exists

parent f0c21a01
No related branches found
No related tags found
1 merge request!1Reformat and cleanup
...@@ -50,6 +50,9 @@ class Event(ExtensibleModel): ...@@ -50,6 +50,9 @@ class Event(ExtensibleModel):
if request.user.person in self.linked_group.members.all(): if request.user.person in self.linked_group.members.all():
return False return False
if EventRegistration.objects.filter(person=request.user.person).exists():
return False
if ( if (
Voucher.objects.filter(event=self, person=request.user.person, used=False).count() Voucher.objects.filter(event=self, person=request.user.person, used=False).count()
> 0 > 0
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment