mirror of
https://github.com/R0m1k3/Priceflow.git
synced 2026-10-20 05:38:12 +02:00
corretion
This commit is contained in:
1 parent
1893988bb1
commit
f7059da02a
5 files changed
+73
-42
No files matched your search
@@ -57,6 +57,12 @@ def _update_db_result(
|
||||
item.current_price = price
|
||||
item.current_price_confidence = p_conf
|
||||
|
||||
# Auto-reset availability if price was successfully extracted
|
||||
# A valid price proves the product is still available
|
||||
if item.is_available is False:
|
||||
item.is_available = True
|
||||
logger.info(f"Item {item_id} marked as available again (price found: {price})")
|
||||
|
||||
session.add(
|
||||
models.PriceHistory(
|
||||
item_id=item.id,
|
||||
|
||||
Reference in new issue
Block a user