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 Jul 3, 2024
1 parent 50baeeb commit 4962786
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 @@ -621,7 +621,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 4962786

Please sign in to comment.