Fix invalid status in alpha beta converter

Thanks to Midnight Sapphire for finding this bug.
This commit is contained in:
Joakim Soderlund 2019-02-22 23:34:24 +01:00
parent 83b02800d1
commit e09d67d291
2 changed files with 7 additions and 3 deletions

View file

@ -255,6 +255,10 @@ class RootHandler(Handler):
@property @property
def completion_status(self) -> Optional[str]: def completion_status(self) -> Optional[str]:
status = self.meta.get('status') status = self.meta.get('status')
if status == 'On Hiatus':
return 'hiatus'
return status and status.strip().lower() return status and status.strip().lower()
@property @property

View file

@ -49,7 +49,7 @@
"image": "https://cdn-img.fimfiction.net/story/vr3n-1432418803-9-medium", "image": "https://cdn-img.fimfiction.net/story/vr3n-1432418803-9-medium",
"likes": 365, "likes": 365,
"short_description": "", "short_description": "",
"status": "Incomplete", "status": "On Hiatus",
"title": "The Greatest Equine Who has Ever Lived!", "title": "The Greatest Equine Who has Ever Lived!",
"total_views": 9943, "total_views": 9943,
"url": "https://www.fimfiction.net/story/9/the-greatest-equine-who-has-ever-lived", "url": "https://www.fimfiction.net/story/9/the-greatest-equine-who-has-ever-lived",
@ -100,7 +100,7 @@
126 126
] ]
}, },
"completion_status": "incomplete", "completion_status": "hiatus",
"content_rating": "everyone", "content_rating": "everyone",
"cover_image": { "cover_image": {
"full": "https://cdn-img.fimfiction.net/story/vr3n-1432418803-9-full", "full": "https://cdn-img.fimfiction.net/story/vr3n-1432418803-9-full",
@ -161,4 +161,4 @@
} }
} }
] ]
} }