Fixes attempt to index a nil value (field 'user_alert_store')

This commit is contained in:
Simone Mainardi 2021-11-23 11:02:26 +01:00
parent 0050459096
commit dafc2e7b80

View file

@ -262,7 +262,7 @@ local pages = {
endpoint_delete = "/lua/rest/v2/delete/user/alerts.lua",
endpoint_acknowledge = "/lua/rest/v2/acknowledge/user/alerts.lua",
url = getPageUrl(base_url_historical_only, {page = "user"}),
hidden = not is_system_interface or not alert_store_instances["user_alert_store"]:has_alerts(),
hidden = not is_system_interface or not alert_store_instances["user"]:has_alerts(),
badge_num = num_alerts_engaged_by_entity[tostring(alert_entities.user.entity_id)]
}
}