John Vandenberg has uploaded a new change for review. https://gerrit.wikimedia.org/r/178051
Change subject: Preload missing langlinks and templates ...................................................................... Preload missing langlinks and templates Site.preloadpages/api.update_page currently doesnt cache that a page doesnt have langlinks or templates. Change-Id: Ia948745a8b8881cba112ae34bb31514623c65169 --- M pywikibot/data/api.py 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/51/178051/1 diff --git a/pywikibot/data/api.py b/pywikibot/data/api.py index cf8ce17..988ab8d 100644 --- a/pywikibot/data/api.py +++ b/pywikibot/data/api.py @@ -1820,6 +1820,8 @@ page._templates.extend(templates) else: page._templates = templates + elif 'templates' in props: + page._templates = [] if "langlinks" in pagedict: links = [] @@ -1833,6 +1835,8 @@ page._langlinks.extend(links) else: page._langlinks = links + elif "langlinks" in props: + page._langlinks = [] if "coordinates" in pagedict: coords = [] -- To view, visit https://gerrit.wikimedia.org/r/178051 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia948745a8b8881cba112ae34bb31514623c65169 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: John Vandenberg <jay...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits