diff --git a/brewman/brewman/routers/user.py b/brewman/brewman/routers/user.py index 98f0f5f8..5d1d05f2 100644 --- a/brewman/brewman/routers/user.py +++ b/brewman/brewman/routers/user.py @@ -102,7 +102,7 @@ def add_roles(user: User, roles: List[schemas.RoleItem], db: Session) -> None: ug = [g for g in user.roles if g.id == role.id_] ug = None if len(ug) == 0 else ug[0] if role.enabled and ug is None: - user.roles.append(db.execute(select(Role).where(Role.id == role.id_)).one()) + user.roles.append(db.execute(select(Role).where(Role.id == role.id_)).scalar_one()) elif not role.enabled and ug: user.roles.remove(ug) diff --git a/deploy.sh b/deploy.sh index 07d12cb9..1a6f0119 100755 --- a/deploy.sh +++ b/deploy.sh @@ -1,4 +1,6 @@ #!/usr/bin/env bash +set -e + parent_path=$( cd "$(dirname "${BASH_SOURCE[0]}")" || exit ; pwd -P ) cd "$parent_path" || exit diff --git a/version_bump.sh b/version_bump.sh index 6202d1c9..4d1c13f4 100755 --- a/version_bump.sh +++ b/version_bump.sh @@ -1,4 +1,6 @@ #!/usr/bin/env bash +set -e + parent_path=$( cd "$(dirname "${BASH_SOURCE[0]}")" || exit ; pwd -P ) cd "$parent_path" || exit