fnp
/
wolnelektury.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
A migration.
[wolnelektury.git]
/
src
/
catalogue
/
models
/
book.py
diff --git
a/src/catalogue/models/book.py
b/src/catalogue/models/book.py
index
5a0f169
..
978bca4
100644
(file)
--- a/
src/catalogue/models/book.py
+++ b/
src/catalogue/models/book.py
@@
-677,6
+677,10
@@
class Book(models.Model):
entity.save()
Reference.objects.filter(book=self).exclude(entity__uri__in=found).delete()
entity.save()
Reference.objects.filter(book=self).exclude(entity__uri__in=found).delete()
+ @property
+ def references(self):
+ return self.reference_set.all().select_related('entity')
+
@classmethod
@transaction.atomic
def repopulate_ancestors(cls):
@classmethod
@transaction.atomic
def repopulate_ancestors(cls):