From bf44571a891241fb3560feb559c5a5adc7acaf08 Mon Sep 17 00:00:00 2001 From: Trenton H <797416+stumpylog@users.noreply.github.com> Date: Thu, 3 Oct 2024 08:55:21 -0700 Subject: [PATCH] Downgrades the error to a warning --- src/documents/checks.py | 3 ++- src/documents/tests/test_checks.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/documents/checks.py b/src/documents/checks.py index 41f836882..2de1572c8 100644 --- a/src/documents/checks.py +++ b/src/documents/checks.py @@ -2,6 +2,7 @@ import textwrap from django.conf import settings from django.core.checks import Error +from django.core.checks import Warning from django.core.checks import register from django.core.exceptions import FieldError from django.db.utils import OperationalError @@ -78,7 +79,7 @@ def filename_format_check(app_configs, **kwargs): converted_format = convert_to_django_template_format(settings.FILENAME_FORMAT) if converted_format != settings.FILENAME_FORMAT: return [ - Error( + Warning( f"Filename format {settings.FILENAME_FORMAT} is using the old style, please update to use double curly brackets", hint=converted_format, ), diff --git a/src/documents/tests/test_checks.py b/src/documents/tests/test_checks.py index 4288f69f1..4af05746f 100644 --- a/src/documents/tests/test_checks.py +++ b/src/documents/tests/test_checks.py @@ -2,6 +2,7 @@ import textwrap from unittest import mock from django.core.checks import Error +from django.core.checks import Warning from django.test import TestCase from django.test import override_settings @@ -82,7 +83,7 @@ class TestDocumentChecks(TestCase): self.assertEqual( filename_format_check(None), [ - Error( + Warning( "Filename format {created}/{title} is using the old style, please update to use double curly brackets", hint="{{ created }}/{{ title }}", ),