Skip to content

Commit

Permalink
Fix sorting: update part stock quantity if a mismatch is found, becau…
Browse files Browse the repository at this point in the history
…se the cached field is used for sorting directly.
  • Loading branch information
gyohng committed Apr 21, 2024
1 parent 42503c4 commit 163ccfb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mainwindow.py
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,9 @@ def populate_footprint_list(self, *_):
)
if detail:
part[4] = detail[0][2]
part[5] = detail[0][1]
if part[5] != str(detail[0][1]):
part[5] = str(detail[0][1])
self.store.set_stock(part[0], detail[0][1])
# First check if the part name mathes
for regex, correction in corrections:
if re.search(regex, str(part[1])):
Expand Down

0 comments on commit 163ccfb

Please sign in to comment.