{% with messages = get_flashed_messages(with_categories=true) %} {% if pro_overlapped and current_endpoint != "pro" %} {% if messages.append(('error', 'You have more services than allowed by your pro license. Upgrade your license or move some services to draft mode to unlock your pro license.')) %} {% endif %} {% endif %} {% if user_readonly and current_endpoint != "profile" %} {% if messages.append(('warning', 'You are in read-only mode. You can\'t make changes that will be saved in the database.')) %} {% endif %} {% endif %} {% set unique_messages = {} %} {% for category, message in messages %} {% if message not in unique_messages %} {% if unique_messages.update({message: True}) %}{% endif %} {% endif %} {% endfor %} {% endwith %}