From 7bb79ce56f8f3cae4c1b4efc6e8bccb268d35c4b Mon Sep 17 00:00:00 2001 From: "Pavel Turinsky (DebianVM @ Zr)" Date: Wed, 30 Jun 2021 00:49:42 +0000 Subject: [PATCH] Oprava check_pohadka --- db_compare.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/db_compare.py b/db_compare.py index a3ba908c..3cdee268 100755 --- a/db_compare.py +++ b/db_compare.py @@ -302,7 +302,8 @@ def check_pohadka(): if get_user_id_for_org_id(n['autor_id']) != o['autor_id']: raise ValueError("Nesedi autori u pohadky") # Správné úlohy - spravny_klic = 'uloha_pred' if o['pred'] else 'uloha_po' + # NOTE: o['pred'] rika, zda je pohadka pred ulohou, nikoliv zda je relevantni uloha pred pohadkou! + spravny_klic = 'uloha_po' if o['pred'] else 'uloha_pred' if o['uloha_id'] != n[spravny_klic]: raise ValueError(f"Pohádka přidružená ke špatné úloze! old: {o['uloha_id']}, new: {n[spravny_klic]}, pozice: {spravny_klic}")