Commit 73ebbb0e authored by Barbora Kompišová's avatar Barbora Kompišová
Browse files

param getting in profile

parent 77441e5b
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -44,6 +44,7 @@ class UserResource(Resource):
        if policies.check_sysadmin(client):
            full = True

        log.debug(f'authorized for full user profile change: {full}')
        json_data = request.get_json()
        if not json_data:
            raise PortalAPIError(400, message='No data provided for user update.')
@@ -51,9 +52,9 @@ class UserResource(Resource):
        log.warn(data)
        user.email = data['email']
        user.uco = data['uco']
        if data.get('name') is None:
        if data.get('name') is not None:
            user.name = data['name']
        if data.get("is_admin") and full:
        if (data.get("is_admin") is not None) and full:
            user.is_admin = data['is_admin']

        log.debug(f"updating user: {user}")