raise on organization validation error

This commit is contained in:
Serghei Mihai 2015-02-06 14:07:56 +01:00
parent c314bc5107
commit d2732e9e47
1 changed files with 3 additions and 4 deletions

View File

@ -138,10 +138,9 @@ def create_organization(context, data_dict):
auth=(client_id, client_secret),
headers=headers
)
except Exception, e:
log.debug('Exception "%s" occured while creating organization' % e)
requests.delete(registration_uri)
except logic.ValidationError, e:
log.debug('Validation error "%s" occured while creating organization' % e)
raise
@valid_signature_required
def delete_organization(context, data_dict):