jenkins-bot has submitted this change. ( 
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/743355 )

Change subject: [bugfix] use page.site.data_repository when creating a 
_WbDataPage
......................................................................

[bugfix] use page.site.data_repository when creating a _WbDataPage

use page.site.data_repository() instead of default Site().data_repository()
when creating a _WbDataPage.

Bug: T296985
Change-Id: I4784d6e7b5de03102c2c7524ace687d3789ad3d3
---
M pywikibot/__init__.py
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Matěj Suchánek: Looks good to me, but someone else must approve
  Xqt: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/pywikibot/__init__.py b/pywikibot/__init__.py
index f0f678e..53e4c7f 100644
--- a/pywikibot/__init__.py
+++ b/pywikibot/__init__.py
@@ -943,7 +943,7 @@
         :param page: page containing the data
         :param site: The Wikibase site
         """
-        site = site or Site().data_repository()
+        site = site or page.site.data_repository()
         specifics = type(self)._get_type_specifics(site)
         _WbDataPage._validate(page, specifics['data_site'],
                               specifics['ending'], specifics['label'])

--
To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/core/+/743355
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.wikimedia.org/r/settings

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: I4784d6e7b5de03102c2c7524ace687d3789ad3d3
Gerrit-Change-Number: 743355
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <[email protected]>
Gerrit-Reviewer: Lokal Profil <[email protected]>
Gerrit-Reviewer: Matěj Suchánek <[email protected]>
Gerrit-Reviewer: Xqt <[email protected]>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged
_______________________________________________
Pywikibot-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to