From 7404e464095c6f0e0bc6213e3ee90aea85ca8f6d Mon Sep 17 00:00:00 2001 From: Brian Martin Date: Mon, 8 Jul 2024 10:48:15 -0400 Subject: [PATCH] Add plain_answer - Import/export of the plain_answer --- models/Flag.py | 1 + setup/xmlsetup.py | 1 + 2 files changed, 2 insertions(+) diff --git a/models/Flag.py b/models/Flag.py index 2248eccf..f03a6df5 100644 --- a/models/Flag.py +++ b/models/Flag.py @@ -462,6 +462,7 @@ def to_xml(self, parent): ET.SubElement(flag_elem, "description").text = self.description ET.SubElement(flag_elem, "capture_message").text = self.capture_message ET.SubElement(flag_elem, "value").text = str(self.value) + ET.SubElement(flag_elem, "plain_answer").text = str(self._plain_answer) ET.SubElement(flag_elem, "locked").text = str(self.locked) if self.lock_id: ET.SubElement(flag_elem, "depends_on").text = Flag.by_id(self.lock_id).name diff --git a/setup/xmlsetup.py b/setup/xmlsetup.py index c5cf71ac..b61b07ad 100644 --- a/setup/xmlsetup.py +++ b/setup/xmlsetup.py @@ -144,6 +144,7 @@ def create_flags(parent, box): flag.name = get_child_text(flag_elem, "name") flag.token = get_child_text(flag_elem, "token") flag.value = get_child_text(flag_elem, "value", 10) + flag._plain_answer = get_child_text(flag_elem, "plain_answer") flag.case_sensitive = get_child_text(flag_elem, "case_sensitive", 0) flag.description = get_child_text(flag_elem, "description") flag.capture_message = get_child_text(flag_elem, "capture_message")