Skip to content

Commit 49f7dab

Browse files
committed
crop_editor bug fix release v2.6.1
1 parent 86ae95e commit 49f7dab

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/crop_editor.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ def filter_crops_by_art_id(
226226
Returns:
227227
Filtered list of crop entries
228228
"""
229-
return [entry for entry in crop_data if art_id in entry.path]
229+
return [entry for entry in crop_data if art_id.zfill(6) in entry.path]
230230

231231

232232
def create_crop_editor_window(
@@ -404,7 +404,7 @@ def load_entry_to_edit(entry: ArtCropData):
404404
window["-CARD_RESULTS-"].update(values=display_results)
405405
else:
406406
window["-CARD_RESULTS-"].update(values=[])
407-
sg.popup_warning(
407+
sg.popup_error(
408408
f"No cards found matching '{search_term}'", title="Search"
409409
)
410410

@@ -421,7 +421,7 @@ def load_entry_to_edit(entry: ArtCropData):
421421
update_crop_table(filtered_crops)
422422

423423
if not filtered_crops:
424-
sg.popup_warning(
424+
sg.popup_error(
425425
f"No crop entries found for ArtId {art_id}", title="No Results"
426426
)
427427

@@ -469,7 +469,7 @@ def load_entry_to_edit(entry: ArtCropData):
469469
f"Invalid values entered: {e}", title="Validation Error"
470470
)
471471
else:
472-
sg.popup_warning(
472+
sg.popup_error(
473473
"Please select an entry from the table first", title="No Selection"
474474
)
475475

0 commit comments

Comments
 (0)