Skip to content

Commit

Permalink
Refactor statushandler into CRUD (#2858)
Browse files Browse the repository at this point in the history
### Changed

- Refactor statushandler into CRUD
  • Loading branch information
henrikstranneheim authored Jan 23, 2024
1 parent 7067691 commit b84f32d
Show file tree
Hide file tree
Showing 21 changed files with 3,409 additions and 3,476 deletions.
2 changes: 1 addition & 1 deletion cg/server/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,7 @@ def write_cancel_comment(self, sample: Sample) -> None:
date: str = datetime.now().strftime("%Y-%m-%d")
comment: str = f"Cancelled {date} by {user_name}"

db.add_sample_comment(sample=sample, comment=comment)
db.update_sample_comment(sample=sample, comment=comment)

def display_cancel_confirmation(
self, sample_entry_ids: list[str], remaining_cases: list[str]
Expand Down
3 changes: 0 additions & 3 deletions cg/store/api/core.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import logging

from cg.store.api.status import StatusHandler
from cg.store.crud.create import CreateHandler
from cg.store.crud.delete import DeleteDataHandler
from cg.store.crud.read import ReadHandler
Expand All @@ -14,15 +13,13 @@ class CoreHandler(
CreateHandler,
DeleteDataHandler,
ReadHandler,
StatusHandler,
UpdateHandler,
):
"""Aggregating class for the store api handlers."""

def __init__(self, session):
DeleteDataHandler(session)
ReadHandler(session)
StatusHandler(session)
UpdateHandler(session)


Expand Down
Loading

0 comments on commit b84f32d

Please sign in to comment.