|
|
|
@ -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) |
|
|
|
|