Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
location = location.country
# Handle the profile.
location = location.country
# Handle the profile.
- try:
- self.fireinfo.handle_profile(public_id, profile_blob, location=location)
+ with self.db.transaction():
+ try:
+ self.fireinfo.handle_profile(public_id, profile_blob, location=location)
- except backend.fireinfo.ProfileParserError:
- raise tornado.web.HTTPError(400)
+ except backend.fireinfo.ProfileParserError:
+ raise tornado.web.HTTPError(400)
self.finish("Your profile was successfully saved to the database.")
self.finish("Your profile was successfully saved to the database.")