diff --git a/app/__init__.py b/app/__init__.py index a8cc7e930..c108d6a8c 100644 --- a/app/__init__.py +++ b/app/__init__.py @@ -315,7 +315,7 @@ def init_app(application): def _attach_current_daily_remaining_messages_per_service(): remaining_messages = 0 - if current_service: + if hasattr(current_service, 'message_limit'): remaining_messages = current_service.message_limit - service_api_client.get_notification_count( service_id=current_service.id)