Update this reference with an other file reference only for non-empty values.
(self, other)
| 531 | ) |
| 532 | |
| 533 | def update(self, other): |
| 534 | """ |
| 535 | Update this reference with an other file reference only for non-empty |
| 536 | values. |
| 537 | """ |
| 538 | for name, value in other.to_dict().items(): |
| 539 | if not value: |
| 540 | continue |
| 541 | current = getattr(self, name, None) |
| 542 | if not current: |
| 543 | setattr(self, name, value) |
| 544 | return self |
| 545 | |
| 546 | |
| 547 | @attr.attributes(slots=True) |