test_quotation_page_serialization: add test with no position
This commit is contained in:
parent
df78cc64a6
commit
8733369605
2 changed files with 7 additions and 5 deletions
|
@ -392,7 +392,7 @@ class Quotation(BookStatus):
|
|||
def _format_position(self) -> Optional[str]:
|
||||
"""serialize page position"""
|
||||
beg = self.position
|
||||
end = self.endposition or 0
|
||||
end = self.endposition
|
||||
if self.position_mode != "PG" or not beg:
|
||||
return None
|
||||
return f"pp. {beg}-{end}" if end else f"p. {beg}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue