Skip to content

Commit

Permalink
Fix NGO slug identifier check (#139)
Browse files Browse the repository at this point in the history
  • Loading branch information
danniel authored Jan 11, 2024
1 parent 5bb648a commit a6d7a73
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions backend/donations/views/ngo.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def get_context_data(self, ngo_url, **kwargs):

ngo_url = ngo_url.lower().strip()
try:
ngo = Ngo.objects.get(form_url=ngo_url)
ngo = Ngo.objects.get(slug=ngo_url)
except Ngo.DoesNotExist:
ngo = None

Expand Down Expand Up @@ -63,7 +63,7 @@ def get_context_data(self, ngo_url, **kwargs):

ngo_url = ngo_url.lower().strip()
try:
ngo = Ngo.objects.get(form_url=ngo_url)
ngo = Ngo.objects.get(slug=ngo_url)
except Ngo.DoesNotExist:
ngo = None

Expand All @@ -86,7 +86,7 @@ class TwoPercentHandler(BaseHandler):

def get(self, request, ngo_url):
try:
ngo = Ngo.objects.get(form_url=ngo_url)
ngo = Ngo.objects.get(slug=ngo_url)
except Ngo.DoesNotExist:
ngo = None

Expand Down Expand Up @@ -157,7 +157,7 @@ def post(self, request, ngo_url):
errors = {"fields": [], "server": False}

try:
ngo = Ngo.objects.get(form_url=ngo_url)
ngo = Ngo.objects.get(slug=ngo_url)
except Ngo.DoesNotExist:
raise Http404

Expand Down

0 comments on commit a6d7a73

Please sign in to comment.