From b9851320d88201485c5d58cf25b87a2a76930e4b Mon Sep 17 00:00:00 2001 From: Peter Surda Date: Sun, 2 Jun 2024 18:00:19 +0800 Subject: [PATCH] parser fix Fixes #182 --- taiga/models/base.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/taiga/models/base.py b/taiga/models/base.py index 7e08297..a8fc755 100644 --- a/taiga/models/base.py +++ b/taiga/models/base.py @@ -196,7 +196,10 @@ def parse(cls, requester, entry): return entry for key_to_parse, cls_to_parse in cls.parser.items(): if key_to_parse in entry: - entry[key_to_parse] = cls_to_parse.parse(requester, entry[key_to_parse]) + if entry[key_to_parse] is None: + entry[key_to_parse] = None + else: + entry[key_to_parse] = cls_to_parse.parse(requester, entry[key_to_parse]) return cls(requester, **entry) def __repr__(self):