MCPcopy Index your code
hub / github.com/O365/python-o365 / save_updates

Method save_updates

O365/sharepoint.py:162–176  ·  view source on GitHub ↗

Save the updated fields to the cloud

(self)

Source from the content-addressed store, hash-verified

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))

Callers

nothing calls this directly

Calls 5

_clear_trackerMethod · 0.95
build_urlMethod · 0.80
_ccMethod · 0.80
getMethod · 0.45
patchMethod · 0.45

Tested by

no test coverage detected