-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
If chapter pages are not defined in the DB (i.e. data is incomplete), python throws a puzzling/not helpful error at this line:
Line 32 in cc782f6
| page_range = re.split('-|–', chapter.get("pages")) |
My take is to turn the Chapter class attribute pages into a list, store page range there and format it correctly when the object is first created (so this is done at api level and the "user" doesn't need to worry about it i.e. in the main.py file). If page data is not present then, throws an error with a nice message.
Metadata
Metadata
Assignees
Labels
No labels