Browse Source

pep8 and admin check

master
Julio Biason 11 years ago
parent
commit
268a7d1ff5
  1. 7
      luncho/blueprints/groups.py

7
luncho/blueprints/groups.py

@ -9,8 +9,6 @@ from flask import Blueprint
from flask import request
from flask import jsonify
from sqlalchemy.exc import IntegrityError
from luncho.helpers import ForceJSON
from luncho.helpers import user_from_token
@ -34,7 +32,7 @@ class NewMaintainerDoesNotExistException(LunchoException):
"""The account for the new maintainer does not exist."""
def __init__(self):
super(NewMaintainerDoesNotExistException, self).__init__()
self.status = 401
self.status = 412
self.message = 'New maintainer not found'
@ -98,6 +96,9 @@ def update_group(token, groupId):
if not group:
raise ElementNotFoundException('Group')
if not group.owner == user.username:
raise UserIsNotAdminException()
LOG.debug('Group = {group}'.format(group=group))
json = request.get_json(force=True)

Loading…
Cancel
Save