Code indexing in gitaly is broken and leads to code not being visible to the user. We work on the issue with highest priority.

Skip to content
Snippets Groups Projects
Commit 3757950b authored by GotthardG's avatar GotthardG
Browse files

Refactor Dewar service methods and improve field handling

Updated Dewar API methods to use protected endpoints for enhanced security and consistency. Added `pgroups` handling in various frontend components and modified the LogisticsView contact field for clarity. Simplified backend router imports for better readability.
parent ee97bdfb
No related branches found
No related tags found
No related merge requests found
Pipeline #48238 passed
......@@ -298,17 +298,17 @@ def generate_label(dewar):
c.drawString(2 * cm, y_position, f"Unique ID: {dewar.unique_id}")
y_position -= line_height
if dewar.contact_person:
contact_person = dewar.contact_person
if dewar.contact:
contact = dewar.contact
c.drawString(
2 * cm,
y_position,
f"Contact: {contact_person.firstname} {contact_person.lastname}",
f"Contact: {contact.firstname} {contact.lastname}",
)
y_position -= line_height
c.drawString(2 * cm, y_position, f"Email: {contact_person.email}")
c.drawString(2 * cm, y_position, f"Email: {contact.email}")
y_position -= line_height
c.drawString(2 * cm, y_position, f"Phone: {contact_person.phone_number}")
c.drawString(2 * cm, y_position, f"Phone: {contact.phone_number}")
y_position -= line_height
if dewar.return_address:
......@@ -368,7 +368,7 @@ async def download_dewar_label(dewar_id: int, db: Session = Depends(get_db)):
db.query(DewarModel)
.options(
joinedload(DewarModel.pucks).joinedload(PuckModel.samples),
joinedload(DewarModel.contact_person),
joinedload(DewarModel.contact),
joinedload(DewarModel.return_address),
joinedload(DewarModel.shipment),
)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment