mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-09 09:39:49 -04:00
Added hasattr() back for potential NoneType error
This commit is contained in:
@@ -315,7 +315,7 @@ def init_app(application):
|
|||||||
def _attach_current_daily_remaining_messages_per_service():
|
def _attach_current_daily_remaining_messages_per_service():
|
||||||
remaining_messages = 0
|
remaining_messages = 0
|
||||||
|
|
||||||
if current_service:
|
if hasattr(current_service, 'message_limit'):
|
||||||
remaining_messages = current_service.message_limit - service_api_client.get_notification_count(
|
remaining_messages = current_service.message_limit - service_api_client.get_notification_count(
|
||||||
service_id=current_service.id)
|
service_id=current_service.id)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user