mirror of
https://github.com/wassname/FanFicFare.git
synced 2026-09-09 11:14:08 +08:00
Improve handling for authors without authorUrl (mostly for teststory).
This commit is contained in:
@@ -1985,7 +1985,8 @@ class FanFicFarePlugin(InterfaceAction):
|
||||
|
||||
author_id_to_link_map = dict()
|
||||
for i, author in enumerate(authorlist):
|
||||
author_id_to_link_map[authorids[author]] = authurls[i]
|
||||
if len(authurls) > i:
|
||||
author_id_to_link_map[authorids[author]] = authurls[i]
|
||||
|
||||
# print("author_id_to_link_map:%s\n\n"%author_id_to_link_map)
|
||||
db.new_api.set_link_for_authors(author_id_to_link_map)
|
||||
|
||||
+1
-1
@@ -683,7 +683,7 @@ class Story(Configurable):
|
||||
htmllist=[]
|
||||
for i, v in enumerate(self.getList('author')):
|
||||
if len(self.getList('authorUrl')) <= i:
|
||||
aurl = "no_author_link"
|
||||
aurl = None
|
||||
else:
|
||||
aurl = self.getList('authorUrl')[i]
|
||||
auth = v
|
||||
|
||||
Reference in New Issue
Block a user