Skip to content

Commit

Permalink
BE-1273 fixed comments on pr
Browse files Browse the repository at this point in the history
  • Loading branch information
tom committed May 18, 2021
1 parent 9399ca8 commit b011881
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions livestyled/models/device_form_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,7 @@ def __repr__(self):
return '<DeviceFormData(id={self.id!r}, device={self.device!r}, form={self.form!r})>'.format(self=self)

def diff(self, other):
differences = {}
fields = (
'data',
)
for field in fields:
if getattr(self, field) != getattr(other, field):
differences[field] = getattr(self, field)
return differences
return {field: getattr(self, field) for field in fields if getattr(self, field) != getattr(other, field)}

0 comments on commit b011881

Please sign in to comment.