Skip to content

Commit

Permalink
Fixing paper deserialization naming
Browse files Browse the repository at this point in the history
- Now considers if name is same as uid (dont name instance)
  • Loading branch information
stephen-bunn committed Nov 13, 2017
1 parent 27fbe9d commit b568b1a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion sandpaper/sandpaper.py
Original file line number Diff line number Diff line change
Expand Up @@ -878,7 +878,11 @@ def from_json(cls, serialization):
:rtype: SandPaper
"""

paper = cls(serialization['name'])
paper = (
cls(serialization['name'])
if serialization['name'] != serialization['uid'] else
cls()
)
for (
rule_name, rule_args, rule_kwargs,
) in serialization['rules']:
Expand Down

0 comments on commit b568b1a

Please sign in to comment.