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

Replace all occurences of check with data_check

parent 2deb9336
No related branches found
No related tags found
1 merge request!1140Resolve "[Data checks] Replace all occurences of check with data_check"
Pipeline #108413 failed
......@@ -216,7 +216,7 @@ class DataCheck:
DataCheckResult = apps.get_model("core", "DataCheckResult")
pks = [r.pk for r in cls._current_results]
old_results = DataCheckResult.objects.filter(check=cls.name).exclude(pk__in=pks)
old_results = DataCheckResult.objects.filter(data_check=cls.name).exclude(pk__in=pks)
if old_results:
logging.info(f"Delete {old_results.count()} old data check results.")
......@@ -261,12 +261,12 @@ def send_emails_for_data_checks():
results = DataCheckResult.objects.filter(solved=False, sent=False)
if results.exists():
results_by_check = results.values("check").annotate(count=Count("check"))
results_by_check = results.values("data_check").annotate(count=Count("data_check"))
results_with_checks = []
for result in results_by_check:
results_with_checks.append(
(DataCheckRegistry.data_checks_by_name[result["check"]], result["count"])
(DataCheckRegistry.data_checks_by_name[result["data_check"]], result["count"])
)
recipient_list = [
......
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