Add numerous missing checks to ensure objects really exist when we think they do. Fixes #2427

This commit is contained in:
Murtuza Zabuawala
2017-05-25 16:28:04 -04:00
committed by Dave Page
parent 04ce72a6ae
commit e9da157cc7
36 changed files with 683 additions and 136 deletions

View File

@@ -307,7 +307,9 @@ class ServerGroupView(NodeView):
group = ServerGroup.query.filter_by(user_id=current_user.id,
id=gid).first()
if not group:
return gone(errormsg="Could not find the server group.")
return gone(
errormsg=gettext("Could not find the server group.")
)
nodes = self.blueprint.generate_browser_node(
"%d" % (group.id), None,