Updates this range format
(self)
| 392 | return data |
| 393 | |
| 394 | def update(self): |
| 395 | """ Updates this range format """ |
| 396 | if self._track_changes: |
| 397 | data = self.to_api_data(restrict_keys=self._track_changes) |
| 398 | if data: |
| 399 | response = self.session.patch(self.build_url(''), data=data) |
| 400 | if not response: |
| 401 | return False |
| 402 | self._track_changes.clear() |
| 403 | if self._font._track_changes: |
| 404 | data = self._font.to_api_data(restrict_keys=self._font._track_changes) |
| 405 | if data: |
| 406 | response = self.session.patch(self.build_url(self._endpoints.get('font')), data=data) |
| 407 | if not response: |
| 408 | return False |
| 409 | self._font._track_changes.clear() |
| 410 | if self._track_background_color: |
| 411 | if self._background_color is None: |
| 412 | url = self.build_url(self._endpoints.get('clear_fill')) |
| 413 | response = self.session.post(url) |
| 414 | else: |
| 415 | data = {'color': self._background_color} |
| 416 | url = self.build_url(self._endpoints.get('fill')) |
| 417 | response = self.session.patch(url, data=data) |
| 418 | if not response: |
| 419 | return False |
| 420 | self._track_background_color = False |
| 421 | |
| 422 | return True |
| 423 | |
| 424 | @property |
| 425 | def font(self): |
nothing calls this directly
no test coverage detected