Skip to content

Commit

Permalink
Add changes from existing-data-tag
Browse files Browse the repository at this point in the history
Merge branch 'existing-data-tag' into open-status-for-only-existing-samples-ticket
  • Loading branch information
eliottBo committed Jan 22, 2025
2 parents 4dd8972 + 0092303 commit 01bade9
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions cg/meta/orders/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from cg.services.orders.validation.models.order_with_cases import OrderWithCases


def does_order_contain_existing_data(order: OrderWithCases) -> bool:
def contains_existing_data(order: OrderWithCases) -> bool:
"""Check if the order contains any existing data"""

for enumerated_case in order.enumerated_cases:
Expand All @@ -22,8 +22,9 @@ def get_ticket_tags(order: Order, order_type: OrderType) -> list[str]:
tags: list[str] = []
tags.append(ORDER_TYPE_WORKFLOW_MAP[order_type])

if does_order_contain_existing_data(order=order):
tags.append("existing-data")
if isinstance(order, OrderWithCases):
if contains_existing_data(order=order):
tags.append("existing-data")

return tags

Expand Down

0 comments on commit 01bade9

Please sign in to comment.