Skip to content

Commit 4bed487

Browse files
authored
Merge pull request #21 from networktocode-llc/dga-readme-1
Update the example CRUD methods in the README
2 parents 0ea4a61 + 5f86bd0 commit 4bed487

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,15 +104,14 @@ class Device(DSyncModel):
104104
@classmethod
105105
def create(cls, dsync, ids, attrs):
106106
## TODO add your own logic here to create the device on the remote system
107-
return cls(**ids, **attrs)
107+
return super().create(ids=ids, dsync=dsync, attrs=attrs)
108108

109109
def update(self, attrs):
110110
## TODO add your own logic here to update the device on the remote system
111-
for attr, value in attrs.items():
112-
setattr(self, attr, value)
113-
return self
111+
return super().update(attrs)
114112

115113
def delete(self):
116114
## TODO add your own logic here to delete the device on the remote system
115+
super().delete()
117116
return self
118117
```

0 commit comments

Comments
 (0)