Skip to content

Commit b12c8c2

Browse files
committed
squashme: fixups for conflict resolutuion after merge
1 parent ccc6a55 commit b12c8c2

3 files changed

Lines changed: 3 additions & 4 deletions

File tree

Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ components/renku_data_services/storage/apispec.py \
4646
components/renku_data_services/users/apispec.py \
4747
components/renku_data_services/project/apispec.py \
4848
components/renku_data_services/session/apispec.py \
49-
components/renku_data_services/user_preferences/apispec.py \
5049
components/renku_data_services/namespace/apispec.py \
5150
components/renku_data_services/secrets/apispec.py \
5251
components/renku_data_services/connected_services/apispec.py \

components/renku_data_services/session/db.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ async def __insert_environment(
6363
new_environment: models.UnsavedEnvironment,
6464
) -> schemas.EnvironmentORM:
6565
if user.id is None:
66-
raise errors.Unauthorized(
66+
raise errors.UnauthorizedError(
6767
message="You have to be authenticated to insert an environment in the DB.", quiet=True
6868
)
6969
environment = schemas.EnvironmentORM(
@@ -89,7 +89,7 @@ async def insert_environment(
8989
) -> models.Environment:
9090
"""Insert a new global session environment."""
9191
if user.id is None or not user.is_admin:
92-
raise errors.Unauthorized(
92+
raise errors.UnauthorizedError(
9393
message="You do not have the required permissions for this operation.", quiet=True
9494
)
9595
if new_environment.environment_kind != models.EnvironmentKind.GLOBAL:

test/bases/renku_data_services/data_api/test_sessions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ async def test_post_session_environment_unauthorized(sanic_client: SanicASGITest
112112

113113
_, res = await sanic_client.post("/api/data/environments", headers=user_headers, json=payload)
114114

115-
assert res.status_code == 403, res.text
115+
assert res.status_code == 401, res.text
116116

117117

118118
@pytest.mark.asyncio

0 commit comments

Comments
 (0)