Add an API

This commit is contained in:
Raphael Michel
2019-09-18 20:48:08 +02:00
parent f22d5915ea
commit b07d9d167d
13 changed files with 408 additions and 10 deletions

View File

@@ -341,7 +341,7 @@ class GiftCardCreateForm(forms.ModelForm):
self.organizer = kwargs.pop('organizer')
super().__init__(*args, **kwargs)
def clean_secret(self):
def validate_secret(self):
s = self.cleaned_data['secret']
if GiftCard.objects.filter(
secret=s