Skip to content
Snippets Groups Projects
Commit 8250dac1 authored by Jonathan Weth's avatar Jonathan Weth :keyboard:
Browse files

Merge branch '1252-some-datachecks-broken-due-to-new-registry-obejct-changes' into 'master'

Resolve "Some Datachecks broken due to new registry obejct changes"

Closes #1252

See merge request !1770
parents cf3934ea 9dd26852
No related branches found
No related tags found
1 merge request!1770Resolve "Some Datachecks broken due to new registry obejct changes"
Pipeline #197103 canceled
......@@ -96,7 +96,7 @@ class DataCheck(RegistryObject):
from django.utils.translation import gettext as _
class ExampleDataCheck(DataCheck):
name = "example" # has to be unique
_class_name = "example" # has to be unique
verbose_name = _("Ensure that there are no examples.")
problem_name = _("There is an example.") # should both make use of i18n
required_for_migrations = True # Make mandatory for migrations
......@@ -361,7 +361,7 @@ def field_validation_data_check_factory(app_name: str, model_name: str, field_na
from django.apps import apps
class FieldValidationDataCheck(DataCheck):
name = f"field_validation_{slugify(model_name)}_{slugify(field_name)}"
_class_name = f"field_validation_{slugify(model_name)}_{slugify(field_name)}"
verbose_name = _("Validate field {field} of model {model}.").format(
field=field_name, model=app_name + "." + model_name
)
......@@ -480,7 +480,7 @@ def _get_colors_from_model_instance(instance, fg_field_name, bg_field_name, fg_c
class ModulateColorsSolveOption(SolveOption):
name = "modulate_colors"
_class_name = "modulate_colors"
verbose_name = _("Auto-adjust Colors")
@classmethod
......@@ -532,7 +532,7 @@ class ModulateColorsSolveOption(SolveOption):
class ColorAccessibilityDataCheck(DataCheck):
name = "colors_accessibility_datacheck"
_class_name = "colors_accessibility_datacheck"
verbose_name = _("Validate contrast accessibility of colors of customizable objects.")
problem_name = _("The colors of this object are not accessible.")
solve_options = {
......@@ -566,7 +566,7 @@ class ColorAccessibilityDataCheck(DataCheck):
class ModulateThemeColorsSolveOption(SolveOption):
name = "modulate_theme_colors"
_class_name = "modulate_theme_colors"
verbose_name = _("Auto-adjust Color")
@classmethod
......@@ -594,7 +594,7 @@ class ModulateThemeColorsSolveOption(SolveOption):
class AccessibleThemeColorsDataCheck(DataCheck):
name = "accessible_themes_colors_datacheck"
_class_name = "accessible_themes_colors_datacheck"
verbose_name = _("Validate that theme colors are accessible.")
problem_name = _("The color does not provide enough contrast")
solve_options = {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment