Skip to content

Commit

Permalink
Handle None as a Structure assignment to align with the original beha…
Browse files Browse the repository at this point in the history
…viour.
  • Loading branch information
Ryan Fox committed Dec 16, 2015
1 parent 0403e71 commit 5421adc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion suitcase/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -833,7 +833,7 @@ def unpack(self, data, **kwargs):
return self._value.unpack(data, **kwargs)

def setval(self, value):
if isinstance(value, suitcase.structure.Structure):
if value is None or isinstance(value, suitcase.structure.Structure):
BaseField.setval(self, value)
else:
self._value.setval(value)
Expand Down

0 comments on commit 5421adc

Please sign in to comment.