From 71dedfc442f53533fe7ae14b71598f0df5025fe0 Mon Sep 17 00:00:00 2001 From: abyrne Date: Thu, 9 Nov 2023 17:24:41 -0500 Subject: [PATCH] chore: setup for db migration --- src/dioptra/restapi/group/service.py | 1 - src/dioptra/restapi/routes.py | 4 ++++ tests/unit/restapi/group/test_group.py | 1 - 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/dioptra/restapi/group/service.py b/src/dioptra/restapi/group/service.py index df35d6e35..1a0c08250 100644 --- a/src/dioptra/restapi/group/service.py +++ b/src/dioptra/restapi/group/service.py @@ -57,7 +57,6 @@ def get_all(**kwargs) -> List[Group]: return Group.query.all() # type: ignore @staticmethod - def get_by_id(group_id: int, **kwargs) -> Group: def get_by_id(group_id: int, **kwargs) -> Group: log: BoundLogger = kwargs.get("log", LOGGER.new()) # noqa: F841 diff --git a/src/dioptra/restapi/routes.py b/src/dioptra/restapi/routes.py index 1718ad720..36553efa7 100644 --- a/src/dioptra/restapi/routes.py +++ b/src/dioptra/restapi/routes.py @@ -38,6 +38,8 @@ def register_routes(api: Api, app: Flask) -> None: from .queue import register_routes as attach_job_queue from .task_plugin import register_routes as attach_task_plugin from .user import register_routes as attach_user + from .group import register_routes as attach_group + from .group_membership import register_routes as attach_group_membership attach_auth(api, app) attach_experiment(api, app) @@ -45,3 +47,5 @@ def register_routes(api: Api, app: Flask) -> None: attach_job_queue(api, app) attach_task_plugin(api, app) attach_user(api, app) + attach_group(api, app) + attach_group_membership(api, app) diff --git a/tests/unit/restapi/group/test_group.py b/tests/unit/restapi/group/test_group.py index 888b1523f..b5e1fb3c6 100644 --- a/tests/unit/restapi/group/test_group.py +++ b/tests/unit/restapi/group/test_group.py @@ -70,7 +70,6 @@ def create_user(db: SQLAlchemy) -> User: created_on=timestamp, last_modified_on=timestamp, last_login_on=timestamp, - user_expire_on=user_expire_on, password_expire_on=password_expire_on, ) db.session.add(new_user)