-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Description
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.