mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2025-07-09 20:40:17 +02:00
Merge branch 'nootification_log_spam' into 'master'
Use default by default in Notification system See merge request allianceauth/allianceauth!1294
This commit is contained in:
commit
247ed7cc64
@ -33,10 +33,8 @@ def user_unread_notification_count(user: object) -> int:
|
|||||||
|
|
||||||
@register.simple_tag
|
@register.simple_tag
|
||||||
def notifications_refresh_time() -> int:
|
def notifications_refresh_time() -> int:
|
||||||
refresh_time = getattr(settings, 'NOTIFICATIONS_REFRESH_TIME', None)
|
refresh_time = getattr(settings, 'NOTIFICATIONS_REFRESH_TIME', Notification.NOTIFICATIONS_REFRESH_TIME_DEFAULT)
|
||||||
if (
|
if (not isinstance(refresh_time, int) or refresh_time < 0):
|
||||||
refresh_time is None or not isinstance(refresh_time, int) or refresh_time < 0
|
|
||||||
):
|
|
||||||
logger.warning('NOTIFICATIONS_REFRESH_TIME setting is invalid. Using default.')
|
logger.warning('NOTIFICATIONS_REFRESH_TIME setting is invalid. Using default.')
|
||||||
refresh_time = Notification.NOTIFICATIONS_REFRESH_TIME_DEFAULT
|
refresh_time = Notification.NOTIFICATIONS_REFRESH_TIME_DEFAULT
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user