@api.login_required(oauth_scopes=['teams:write'])
    @api.resolve_object_by_model(Team, 'team')
    @api.permission_required(
        permissions.OwnerRolePermission,
        kwargs_on_request=lambda kwargs: {'obj': kwargs['team']}
    )
    @api.permission_required(permissions.WriteAccessPermission())
    @api.parameters(parameters.PatchTeamDetailsParameters())
    @api.response(schemas.DetailedTeamSchema())
    @api.response(code=http_exceptions.Conflict.code)
    def patch(self, args, team):
        """
        Patch team details by ID.
        """
        try:
            for operation in args:
                try:
                    if not self._process_patch_operation(operation, team=team):
                        log.info("Team patching has ignored unknown operation %s", operation)
                except __HOLE__ as exception:
                    abort(code=http_exceptions.Conflict.code, message=str(exception))

            db.session.merge(team)

            try:
                db.session.commit()
            except sqlalchemy.exc.IntegrityError:
                abort(
                    code=http_exceptions.Conflict.code,
                    message="Could not update team details."
                )
        finally:
            db.session.rollback()
        return team
dataset/ETHPy150Open frol/flask-restplus-server-example/app/modules/teams/resources.py/TeamByID.patch