X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/cf5dddce80a2b4fe4d5f8c87cc709050c0efb36e..13f286427e0ceb7a6c442844c447c7c3d5495871:/src/catalogue/models.py diff --git a/src/catalogue/models.py b/src/catalogue/models.py index 8bcf4e00..151a13e4 100644 --- a/src/catalogue/models.py +++ b/src/catalogue/models.py @@ -288,6 +288,12 @@ class Book(WikidataModel): def translators_last_names(self): return ', '.join(a.last_name for a in self.translators.all()) + def document_book__project(self): + b = self.document_books.first() + if b is None: return '' + if b.project is None: return '' + return b.project.name + def get_estimated_costs(self): return { work_type: work_type.calculate(self)