Save the updated fields to the cloud
(self)
| 160 | self.fields = updates |
| 161 | |
| 162 | def save_updates(self): |
| 163 | """Save the updated fields to the cloud""" |
| 164 | |
| 165 | if not self._track_changes: |
| 166 | return True # there's nothing to update |
| 167 | |
| 168 | url = self.build_url(self._endpoints.get('update_list_item').format(item_id=self.object_id)) |
| 169 | update = {field: value for field, value in self.fields.items() |
| 170 | if self._cc(field) in self._track_changes} |
| 171 | |
| 172 | response = self.con.patch(url, update) |
| 173 | if not response: |
| 174 | return False |
| 175 | self._clear_tracker() |
| 176 | return True |
| 177 | |
| 178 | def delete(self): |
| 179 | url = self.build_url(self._endpoints.get('delete_list_item').format(item_id=self.object_id)) |
nothing calls this directly
no test coverage detected