Skip to content

Commit

Permalink
Update code
Browse files Browse the repository at this point in the history
  • Loading branch information
odkhang committed Dec 6, 2024
1 parent 44ba409 commit 5cfdea6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions server/venueless/api/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,9 @@ def post(request, *args, **kwargs) -> JsonResponse:
title = titles.get(locale) or titles.get("en") or title_default

attendee_trait_grants = request.data.get("traits", {}).get("attendee", "")
if not isinstance(attendee_trait_grants, str):
raise ValidationError("Attendee traits must be a string")

trait_grants = {
"admin": ["admin"],
"attendee": (
Expand Down

0 comments on commit 5cfdea6

Please sign in to comment.