Refresh the object's metadata from the library database. If check_revision is true, the database is only queried loaded when a transaction has been committed since the item was last loaded.
(self)
| 634 | self.clear_dirty() |
| 635 | |
| 636 | def load(self): |
| 637 | """Refresh the object's metadata from the library database. |
| 638 | |
| 639 | If check_revision is true, the database is only queried loaded when a |
| 640 | transaction has been committed since the item was last loaded. |
| 641 | """ |
| 642 | if not self._dirty and self.db.revision == self._revision: |
| 643 | # Exit early |
| 644 | return |
| 645 | |
| 646 | self.__dict__.update(self.get_fresh_from_db().__dict__) |
| 647 | self.clear_dirty() |
| 648 | |
| 649 | def remove(self): |
| 650 | """Remove the object's associated rows from the database.""" |