MCPcopy Create free account
hub / github.com/O365/python-o365 / update_fields

Method update_fields

O365/sharepoint.py:143–160  ·  view source on GitHub ↗

Update the value for a field(s) in the listitem :param update: A dict of {'field name': newvalue}

(self, updates)

Source from the content-addressed store, hash-verified

141 return True
142
143 def update_fields(self, updates):
144 """
145 Update the value for a field(s) in the listitem
146
147 :param update: A dict of {'field name': newvalue}
148 """
149
150 for field in updates:
151 if self._valid_field(field):
152 self._track_changes.add(field)
153 else:
154 raise ValueError('"{}" is not a valid internal field name'.format(field))
155
156 # Update existing instance of fields, or create a fields instance if needed
157 if self.fields:
158 self.fields.update(updates)
159 else:
160 self.fields = updates
161
162 def save_updates(self):
163 """Save the updated fields to the cloud"""

Callers

nothing calls this directly

Calls 3

_valid_fieldMethod · 0.95
addMethod · 0.45
updateMethod · 0.45

Tested by

no test coverage detected