Skip to content

Commit

Permalink
fix: apiurl.lower(): NoneType' object has no attribute 'lower'
Browse files Browse the repository at this point in the history
  • Loading branch information
yzqzss committed Sep 25, 2023
1 parent 5dbae3a commit 7205a17
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion wikiteam3/utils/ia_checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,10 @@ def search_ia(apiurl: Optional[str] = None, indexurl: Optional[str] = None, adde
# {'identifier': 'wiki-wikiothingxyz-20230315',
# 'addeddate': '2023-03-15T01:42:12Z',
# 'subject': ['wiki', 'wikiteam', 'MediaWiki', .....]}
if apiurl.lower() == result['originalurl'].lower() or indexurl.lower() == result['originalurl'].lower():
if result['originalurl'].lower() in [
apiurl.lower() if apiurl else None,
indexurl.lower() if indexurl else None
]:
logger.info(f'Original URL match: {result}')
yield result
item = result
Expand Down

0 comments on commit 7205a17

Please sign in to comment.