Skip to content

Commit 0aea769

Browse files
committed
Display all grids, even if they are not in a cassette
1 parent 54dd01a commit 0aea769

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/scaup/crud/pdf.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,7 @@ def generate_report(shipment_id: int, token: str):
446446
gridbox_name: str = grid.container.name if grid.container else "None"
447447
gridbox_location: str = str(grid.container.location) if grid.container is not None else "None"
448448

449-
grids_table[current_row] = (
449+
row_text = (
450450
str(puck_name),
451451
str(gridbox_location),
452452
str(gridbox_name),
@@ -456,6 +456,12 @@ def generate_report(shipment_id: int, token: str):
456456
str(grid.details["hole"]),
457457
str(grid.comments),
458458
)
459+
460+
if current_row >= len(grids_table):
461+
grids_table.append(row_text)
462+
else:
463+
grids_table[current_row] = row_text
464+
459465
current_row += 1
460466

461467
session_table = [

0 commit comments

Comments
 (0)