mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-29 04:51:11 +00:00
Quotation._format_position: do not treat page numbers as integers
Fixes: #3352
This commit is contained in:
parent
f844abcad9
commit
df78cc64a6
2 changed files with 1 additions and 3 deletions
|
@ -395,7 +395,7 @@ class Quotation(BookStatus):
|
||||||
end = self.endposition or 0
|
end = self.endposition or 0
|
||||||
if self.position_mode != "PG" or not beg:
|
if self.position_mode != "PG" or not beg:
|
||||||
return None
|
return None
|
||||||
return f"pp. {beg}-{end}" if end > beg else f"p. {beg}"
|
return f"pp. {beg}-{end}" if end else f"p. {beg}"
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def pure_content(self):
|
def pure_content(self):
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
""" testing models """
|
""" testing models """
|
||||||
from unittest import expectedFailure
|
|
||||||
from unittest.mock import patch
|
from unittest.mock import patch
|
||||||
import pathlib
|
import pathlib
|
||||||
import re
|
import re
|
||||||
|
@ -338,7 +337,6 @@ class Status(TestCase):
|
||||||
activity["attachment"][0]["name"], "Author Name: Test Edition (worm)"
|
activity["attachment"][0]["name"], "Author Name: Test Edition (worm)"
|
||||||
)
|
)
|
||||||
|
|
||||||
@expectedFailure
|
|
||||||
def test_quotation_page_serialization(self, *_):
|
def test_quotation_page_serialization(self, *_):
|
||||||
"""serialization of quotation page position"""
|
"""serialization of quotation page position"""
|
||||||
tests = [
|
tests = [
|
||||||
|
|
Loading…
Reference in a new issue