1
0
mirror of https://github.com/linkedin/oncall.git synced 2025-11-29 23:38:17 +02:00

Disallow empty team name on PUT

This commit is contained in:
Daniel Wang
2018-09-20 14:56:46 -07:00
parent 5ab4685414
commit 05c68a23cc

View File

@@ -204,6 +204,8 @@ def on_put(req, resp, team):
if invalid_char:
raise HTTPBadRequest('invalid team name',
'team name contains invalid character "%s"' % invalid_char.group())
elif data['name'] == '':
raise HTTPBadRequest('invalid team name', 'empty team name')
if 'iris_plan' in data and data['iris_plan']:
iris_plan = data['iris_plan']