From 02f2e72e6b75b9fc357ae85f44d78e674eae2d96 Mon Sep 17 00:00:00 2001 From: Raphael Michel Date: Fri, 4 Oct 2024 15:12:12 +0200 Subject: [PATCH] Fix #32 -- Parsing of amount without currency --- drafthorse/models/container.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drafthorse/models/container.py b/drafthorse/models/container.py index 8219378..eb1755e 100644 --- a/drafthorse/models/container.py +++ b/drafthorse/models/container.py @@ -61,10 +61,7 @@ class CurrencyContainer(SimpleContainer): el._currency = child[1] def add_from_etree(self, root): - if root.attrib.get("currencyID"): - self.add((root.text, root.attrib["currencyID"])) - else: - self.add(root.text) + self.add((root.text, root.attrib.get("currencyID"))) class IDContainer(SimpleContainer): -- 2.47.3