]> git.phdru.name Git - m_librarian.git/blobdiff - m_librarian/db.py
Feat(db): Add book.author1 property
[m_librarian.git] / m_librarian / db.py
index 0c41d4b7c9e70eb675bce95661576509688eab83..9081a422e0389b0da6f60c7cb94487b8ca3ed061 100755 (executable)
@@ -72,6 +72,10 @@ class Book(SQLObject):
     date_idx = DatabaseIndex(date)
     language_idx = DatabaseIndex(language)
 
+    @property
+    def author1(self):
+        return self.authors[0].fullname
+
 
 class BookGenre(SQLObject):
     class sqlmeta: