From f3236e882716f9b9587cd8bf4e8b1123c9f6ac2b Mon Sep 17 00:00:00 2001 From: Martin Mares <mj@ucw.cz> Date: Wed, 5 Feb 2025 14:45:22 +0100 Subject: [PATCH] Oprava --publish-score u bin/set-round a bin/create-round --- mo/arg_attrs.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mo/arg_attrs.py b/mo/arg_attrs.py index 8409e51b..a0db3e55 100644 --- a/mo/arg_attrs.py +++ b/mo/arg_attrs.py @@ -49,6 +49,7 @@ class Attr: def args_to_obj(self, args: argparse.Namespace, obj: Any) -> None: key = self.long.replace('-', '_') if self.long else self.name val = getattr(args, key) + assert hasattr(obj, self.name) if val is not Ellipsis: setattr(obj, self.name, val) @@ -130,7 +131,7 @@ ROUND_ATTRS = AttrList([ Attr('enroll_deadline', parse_time, 'deadline přihlašování', nullable=True), Attr('min_rec_grade', int, 'minimální doporučený ročník (1-12)', nullable=True), Attr('max_rec_grade', int, 'maximální doporučený ročník (1-12)', nullable=True), - Attr('export_score_to_web', parse_bool, 'exportovat výsledkovky na web', long='publish-score'), + Attr('export_score_to_mo_web', parse_bool, 'exportovat výsledkovky na web', long='publish-score'), ]) -- GitLab