We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8517224 commit ec29cc4Copy full SHA for ec29cc4
app/api/tickets.py
@@ -22,7 +22,7 @@
22
23
24
def validate_ticket_price(data):
25
- if not data.get('price') and data.get('type'):
+ if not data.get('price') or not data.get('type'):
26
raise UnprocessableEntity({}, "Type/price of ticket is missing")
27
if data.get('type') != 'free' and int(data.get('price')) <= 0:
28
raise UnprocessableEntity(
0 commit comments