Skip to content

Commit

Permalink
"In stock" should be 'none' by default
Browse files Browse the repository at this point in the history
  • Loading branch information
dgtlmoon committed Jan 1, 2024
1 parent 3d1e102 commit 47803f9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions changedetectionio/model/Watch.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
'track_ldjson_price_data': None,
'headers': {}, # Extra headers to send
'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
'include_filters': [],
'last_checked': 0,
Expand Down
1 change: 1 addition & 0 deletions changedetectionio/store.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@ def clear_watch_history(self, uuid):
'check_count': 0,
'fetch_time' : 0.0,
'has_ldjson_price_data': None,
'in_stock': None,
'last_checked': 0,
'last_error': False,
'last_notification_error': False,
Expand Down
2 changes: 1 addition & 1 deletion changedetectionio/templates/watch-overview.html
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@
{% if watch['processor'] == 'restock_diff' %}
<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.. -->
{% if watch['last_checked'] %}
{% if watch['last_checked'] and watch['in_stock'] != None %}
{% if watch['in_stock'] %} In stock {% else %} Not in stock {% endif %}
{% else %}
Not yet checked
Expand Down

0 comments on commit 47803f9

Please sign in to comment.