From f5ce6895e6cf4e0bf37afa59fb9c47275e8bc38b Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 3 Jan 2023 23:19:11 +0100 Subject: [PATCH] fixed issue with nrItems (again) --- src/data.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/data.py b/src/data.py index 0977d62..7d6d6a9 100644 --- a/src/data.py +++ b/src/data.py @@ -69,14 +69,9 @@ class Trade(): @classmethod def by_regex_result(cls, res): - if 'nrItems' in res.groupdict(): - nrItems = int(res['nrItems']) - else: - # If no number is specified we only search for one item - nrItems = 1 - return cls(nrItems=nrItems, + return cls(nrItems=res['nrItems'], item=res['item'], - amount=int(res['amount']), + amount=float(res['amount']), currency=res['currency'], tab=res['tab'], row=res['row'],