fixed issue with nrItems (again)

This commit is contained in:
Oliver Hartmann 2023-01-03 23:19:11 +01:00
parent e055f17fd2
commit f5ce6895e6

View File

@ -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'],