Skip to content

Commit

Permalink
Fixes bug in Result unserialization (#31)
Browse files Browse the repository at this point in the history
* Fixes bug in Result unserialization

---------

Signed-off-by: Lorenzo Addazi <[email protected]>
Co-authored-by: Alessio Stalla <[email protected]>
  • Loading branch information
loradd and alessiostalla authored Nov 21, 2023
1 parent 29c432c commit 7b859a8
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions pylasu/astruntime.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@


def unserialize_result(json_result, root_unserializer) -> Result:
return Result(
root=root_unserializer(json_result['root']) if 'root' in json_result else None,
issues=[unserialize_issue(issue) for issue in json_result['issues']] if 'issues' in json_result else []
)
result = Result(root=root_unserializer(json_result['root']) if 'root' in json_result else None)
result.issues = [unserialize_issue(issue) for issue in json_result['issues']] if 'issues' in json_result else []
return result


def unserialize_issue(json_issue) -> Issue:
Expand Down

0 comments on commit 7b859a8

Please sign in to comment.