Skip to content

Commit

Permalink
Fix order messages
Browse files Browse the repository at this point in the history
  • Loading branch information
islean committed Jan 23, 2025
1 parent 6a68460 commit cafab74
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions cg/services/orders/submitter/ticket_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,13 +119,12 @@ def add_sample_case_name_to_message(message: str, case_name: str | None) -> str:
def add_existing_sample_info_to_message(
self, message: str, customer_id: str, internal_id: str, case_name: str
) -> str:

existing_sample: Sample = self.status_db.get_sample_by_internal_id(internal_id=internal_id)

sample_customer = ""
if existing_sample.customer_id != customer_id:
sample_customer = " from " + existing_sample.customer.internal_id

message += self.NEW_LINE
message += f"{existing_sample.name}, application: {existing_sample.application_version.application.tag}, case: {case_name} (already existing sample{sample_customer}), priority: {existing_sample.priority.name}"
return message

Expand Down Expand Up @@ -189,7 +188,6 @@ def create_case_xml_sample_list(self, order, message: str) -> str:
)
else:
for sample in case.samples:
message += self.NEW_LINE
if not sample.is_new:
message = self.add_existing_sample_info_to_message(
message=message,
Expand Down

0 comments on commit cafab74

Please sign in to comment.