diff --git a/api/src/reportcreator_api/pentests/collab/text_transformations.py b/api/src/reportcreator_api/pentests/collab/text_transformations.py index ed78859b5..85162ca62 100644 --- a/api/src/reportcreator_api/pentests/collab/text_transformations.py +++ b/api/src/reportcreator_api/pentests/collab/text_transformations.py @@ -336,17 +336,16 @@ def to_dict(self): @classmethod def from_dict(cls, u: dict): - if not isinstance(u, dict) or not isinstance(u.get('client_id'), str) or not isinstance(u.get('version'), float) or \ + if not isinstance(u, dict) or not isinstance(u.get('client_id'), str) or not isinstance(u.get('version'), (int, float)) or \ not isinstance(u.get('changes'), list): raise ValueError('Invalid update') return Update( client_id=u['client_id'], - version=u['version'], + version=float(u['version']), changes=ChangeSet.from_dict(u['changes']), ) - class SectionIter: def __init__(self, set: ChangeSet): self.set = set