Skip to content
Snippets Groups Projects
Verified Commit 7b0ec505 authored by Jonathan Weth's avatar Jonathan Weth :keyboard:
Browse files

Set comment in data check solve revisions

parent bc7876d5
No related branches found
No related tags found
1 merge request!389Add data check system
Pipeline #5032 failed
......@@ -5,6 +5,7 @@ from django.db.models.aggregates import Count
from django.utils.translation import gettext as _
import reversion
from reversion import set_comment
from templated_email import send_templated_mail
from .util.core_helpers import celery_optional, get_site_preferences
......@@ -150,7 +151,14 @@ class DataCheck:
:param solve_option: The name of the solve option that should be executed
"""
with reversion.create_revision():
cls.solve_options[solve_option].solve(check_result)
solve_option_obj = cls.solve_options[solve_option]
set_comment(
_(
f"Solve option '{solve_option_obj.verbose_name}' "
f"for data check '{cls.verbose_name}'"
)
)
solve_option_obj.solve(check_result)
@classmethod
def register_result(cls, instance) -> "DataCheckResult":
......
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