"In stock" should be 'none' by default

pull/2069/head
dgtlmoon 11 months ago
parent 3d1e1025d2
commit 47803f95a3

@ -38,6 +38,7 @@ base_config = {
'track_ldjson_price_data': None, 'track_ldjson_price_data': None,
'headers': {}, # Extra headers to send 'headers': {}, # Extra headers to send
'ignore_text': [], # List of text to ignore when calculating the comparison checksum 'ignore_text': [], # List of text to ignore when calculating the comparison checksum
'in_stock' : None,
'in_stock_only' : True, # Only trigger change on going to instock from out-of-stock 'in_stock_only' : True, # Only trigger change on going to instock from out-of-stock
'include_filters': [], 'include_filters': [],
'last_checked': 0, 'last_checked': 0,

@ -248,6 +248,7 @@ class ChangeDetectionStore:
'check_count': 0, 'check_count': 0,
'fetch_time' : 0.0, 'fetch_time' : 0.0,
'has_ldjson_price_data': None, 'has_ldjson_price_data': None,
'in_stock': None,
'last_checked': 0, 'last_checked': 0,
'last_error': False, 'last_error': False,
'last_notification_error': False, 'last_notification_error': False,

@ -141,7 +141,7 @@
{% if watch['processor'] == 'restock_diff' %} {% if watch['processor'] == 'restock_diff' %}
<span class="restock-label {{'in-stock' if watch['in_stock'] else 'not-in-stock' }}" title="detecting restock conditions"> <span class="restock-label {{'in-stock' if watch['in_stock'] else 'not-in-stock' }}" title="detecting restock conditions">
<!-- maybe some object watch['processor'][restock_diff] or.. --> <!-- maybe some object watch['processor'][restock_diff] or.. -->
{% if watch['last_checked'] %} {% if watch['last_checked'] and watch['in_stock'] != None %}
{% if watch['in_stock'] %} In stock {% else %} Not in stock {% endif %} {% if watch['in_stock'] %} In stock {% else %} Not in stock {% endif %}
{% else %} {% else %}
Not yet checked Not yet checked

Loading…
Cancel
Save