return 409 on conflict

This commit is contained in:
j 2011-10-31 16:06:12 +00:00
commit c695e76a57
2 changed files with 4 additions and 4 deletions

View file

@ -62,7 +62,7 @@ def addPlace(request):
tasks.update_matches.delay(place.id)
response = json_response(place.json())
else:
response = json_response(status=403,
response = json_response(status=409,
text='%s exists'%(existing_names and 'Name' or 'Geoname'))
response['data']['names'] = existing_names
if existing_geoname:
@ -110,7 +110,7 @@ def editPlace(request):
tasks.update_matches.delay(place.id)
response = json_response(place.json())
else:
response = json_response(status=403,
response = json_response(status=409,
text='%s exists'%(conflict_names and 'Name' or 'Geoname'))
response['data']['names'] = conflict_names
if conflict_geoname: