Skip to content

Commit

Permalink
Merge branch 'fix-typeerror' into 'main'
Browse files Browse the repository at this point in the history
Fix collab update version typerror

See merge request reportcreator/reportcreator!646
  • Loading branch information
MWedl committed Aug 7, 2024
2 parents 5cd9205 + bbe23ff commit a78b101
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a78b101

Please sign in to comment.