Skip to content

Commit e9582bf

Browse files
committed
rename repo_tags
1 parent 8888805 commit e9582bf

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

packages/postgres-database/src/simcore_postgres_database/utils_tags.py renamed to packages/postgres-database/src/simcore_postgres_database/tags_repo.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,10 @@ async def create(
9191
if description:
9292
values["description"] = description
9393

94-
# TODO: validate read/write/delete combitations
94+
if not read:
95+
read = write or delete
96+
if not write:
97+
write = delete
9598

9699
async with conn.begin():
97100
# insert new tag

packages/postgres-database/tests/test_utils_tags.py renamed to packages/postgres-database/tests/test_repo_tags.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@
1313
from pytest_simcore.helpers.postgres_tags import create_tag, create_tag_access
1414
from simcore_postgres_database.models.tags_access_rights import tags_to_groups
1515
from simcore_postgres_database.models.users import UserRole, UserStatus
16+
from simcore_postgres_database.tags_repo import (
17+
TagNotFoundError,
18+
TagOperationNotAllowedError,
19+
TagsRepo,
20+
)
1621
from simcore_postgres_database.tags_sql import (
1722
add_tag_to_project_stmt,
1823
create_tag_stmt,
@@ -24,11 +29,6 @@
2429
update_tag_stmt,
2530
)
2631
from simcore_postgres_database.utils import as_postgres_sql_query_str
27-
from simcore_postgres_database.utils_tags import (
28-
TagNotFoundError,
29-
TagOperationNotAllowedError,
30-
TagsRepo,
31-
)
3232

3333

3434
@pytest.fixture

services/web/server/src/simcore_service_webserver/tags/_handlers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
from servicelib.aiohttp.typing_extension import Handler
1414
from servicelib.mimetype_constants import MIMETYPE_APPLICATION_JSON
1515
from servicelib.request_keys import RQT_USERID_KEY
16-
from simcore_postgres_database.utils_tags import (
16+
from simcore_postgres_database.tags_repo import (
1717
TagDict,
1818
TagNotFoundError,
1919
TagOperationNotAllowedError,

0 commit comments

Comments
 (0)