fnp
/
librarian.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add epub debugging.
[librarian.git]
/
src
/
librarian
/
elements
/
root
/
__init__.py
diff --git
a/src/librarian/elements/root/__init__.py
b/src/librarian/elements/root/__init__.py
index
a8cf82d
..
ae7705e
100644
(file)
--- a/
src/librarian/elements/root/__init__.py
+++ b/
src/librarian/elements/root/__init__.py
@@
-1,3
+1,6
@@
+# This file is part of Librarian, licensed under GNU Affero GPLv3 or later.
+# Copyright © Fundacja Wolne Lektury. See NOTICE for more information.
+#
from ..base import WLElement
from ..masters import Master
from ..base import WLElement
from ..masters import Master
@@
-17,3
+20,11
@@
class Utwor(WLElement):
# This should not generally happen.
if self.getparent() is not None:
return self.getparent().meta
# This should not generally happen.
if self.getparent() is not None:
return self.getparent().meta
+ # Fallback
+ return self.document.base_meta
+
+ @property
+ def master(self):
+ for c in self:
+ if isinstance(c, Master):
+ return c