From cf7ed0904984502591f6dcd0f39480a851ce2f29 Mon Sep 17 00:00:00 2001 From: Marcus Lindvall Date: Fri, 6 Sep 2019 08:25:59 +0200 Subject: [PATCH] Fix get conversion factor NoneType error, for articles. --- pyjeeves/models/raw.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyjeeves/models/raw.py b/pyjeeves/models/raw.py index 8ca878d..33675d1 100644 --- a/pyjeeves/models/raw.py +++ b/pyjeeves/models/raw.py @@ -144,7 +144,7 @@ class Article(RawBaseModel): unit = self._get_standard_alt_unit() if unit and unit.AltEnhetOmrFaktor: return unit.AltEnhetOmrFaktor - else: + elif unit: return unit.ArticleAlternativeUnit.AltEnhetOmrFaktor return 1