return error 409 when attempting to create duplicates
This commit is contained in:
parent
4c6d9e8fd7
commit
277e712449
1 changed files with 5 additions and 2 deletions
|
@ -262,6 +262,9 @@ class EventResource(BaseEvent):
|
|||
cur.close()
|
||||
db.close()
|
||||
# send back to client
|
||||
if e is None:
|
||||
resp.status = falcon.HTTP_409
|
||||
else:
|
||||
resp.body = """{"id":"%s"}""" % (e[0])
|
||||
resp.status = falcon.HTTP_201
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue