From 03452e12214dd5f2bd5cbadaeddbcdc36ee8fa5a Mon Sep 17 00:00:00 2001 From: Joakim Soderlund Date: Fri, 30 Aug 2019 21:58:28 +0200 Subject: [PATCH] Fix invalid author ID in alpha beta converter --- fimfarchive/converters/alpha_beta/__init__.py | 6 +++++- tests/converters/test_alpha_beta.json | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/fimfarchive/converters/alpha_beta/__init__.py b/fimfarchive/converters/alpha_beta/__init__.py index c7141ec..decc6ce 100644 --- a/fimfarchive/converters/alpha_beta/__init__.py +++ b/fimfarchive/converters/alpha_beta/__init__.py @@ -129,9 +129,13 @@ class AuthorHandler(Handler): 'url', ) + @property + def id(self): + return int(self.meta['id']) + @property def url(self): - uid = int(self.id) + uid = self.id name = urlquote(str(self.name)) return f'{HOST}/user/{uid}/{name}' diff --git a/tests/converters/test_alpha_beta.json b/tests/converters/test_alpha_beta.json index a976771..aa0d84e 100644 --- a/tests/converters/test_alpha_beta.json +++ b/tests/converters/test_alpha_beta.json @@ -3,7 +3,7 @@ { "alpha": { "author": { - "id": 18, + "id": "18", "name": "Sethisto" }, "categories": {