Skip to content

Commit

Permalink
Remove unnecessary rules
Browse files Browse the repository at this point in the history
  • Loading branch information
islean committed Aug 29, 2024
1 parent 1aa8498 commit 7984b28
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,15 @@
TomteSample,
)

NewSample = Annotated[TomteSample, Tag("new")]
OldSample = Annotated[ExistingSample, Tag("existing")]


class TomteCase(Case):
cohorts: list[str] | None = None
panels: list[str]
synopsis: str | None = None
samples: list[
Annotated[
Annotated[TomteSample, Tag("new")] | Annotated[ExistingSample, Tag("existing")],
Discriminator(has_internal_id),
]
]
samples: list[Annotated[NewSample | OldSample, Discriminator(has_internal_id)]]

def get_sample(self, sample_name: str) -> TomteSample | None:
for sample in self.samples:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,10 @@
)
from cg.services.order_validation_service.workflows.tomte.models.case import TomteCase

NewCase = Annotated[TomteCase, Tag("new")]
OldCase = Annotated[ExistingCase, Tag("existing")]


class TomteOrder(OrderWithCases):
cases: list[
Annotated[
Annotated[TomteCase, Tag("new")] | Annotated[ExistingCase, Tag("existing")],
Discriminator(has_internal_id),
]
]
cases: list[Annotated[NewCase | OldCase, Discriminator(has_internal_id)]]
delivery_type: TomteDeliveryType

0 comments on commit 7984b28

Please sign in to comment.