You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
After updating from a couple months old version (sorry, can't remember which), trying to save system-wide notification settings while either notification title or body uses the token restock prevents from saving settings while also showing the error message below:
The following tokens used in the notification are not valid: restock
If using a restock property directly without checking if restock exists, for example a message composed of just {{ restock.price }}, the error is:
A variable or function is not defined: 'restock' is undefined
When editing settings for a specific watch of type "Re-stock & Price detection", the token is accepted.
Version
v0.48.05
How did you install?
Docker
To Reproduce
Go to settings > notifications
Write the example value below In the notification body field:
{% if restock %}From $ {{restock.original_price}} to $ {{restock.price}}{% else %}{{diff}}{% endif %}
Save
An error occurs and the settings aren't saved
Expected behavior
Token should be accepted and settings should be saved, as it worked a few versions ago.
The text was updated successfully, but these errors were encountered:
I reverted all the way to 0.45.13 (jan 2024) and I still get the error, so it's not due to updating to a newer version.
Debugging it a bit more, turns out the token restock is only accepted by the system-wide notification settings if you have at least one watch of type "Re-stock & Price detection".
Turns out, the reason I managed to have that notification body saved even though I can't save it anymore, is because I used to have a watch of that type but deleted afterwards.
I don't know if this is expected behavior so I won't close the issue, but feel free to do so.
Describe the bug
After updating from a couple months old version (sorry, can't remember which), trying to save system-wide notification settings while either notification title or body uses the token
restock
prevents from saving settings while also showing the error message below:The following tokens used in the notification are not valid: restock
If using a restock property directly without checking if
restock
exists, for example a message composed of just{{ restock.price }}
, the error is:A variable or function is not defined: 'restock' is undefined
When editing settings for a specific watch of type "Re-stock & Price detection", the token is accepted.
Version
v0.48.05
How did you install?
Docker
To Reproduce
{% if restock %}From $ {{restock.original_price}} to $ {{restock.price}}{% else %}{{diff}}{% endif %}
Expected behavior
Token should be accepted and settings should be saved, as it worked a few versions ago.
The text was updated successfully, but these errors were encountered: