Skip to content

Commit

Permalink
Merge "Check for common class when comparing with string"
Browse files Browse the repository at this point in the history
  • Loading branch information
jenkins-bot authored and Gerrit Code Review committed Jan 15, 2017
2 parents c47dd85 + c7c0645 commit f402a44
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pywikibot/page.py
Original file line number Diff line number Diff line change
Expand Up @@ -4726,7 +4726,7 @@ def target_equals(self, value):
The function checks for:
- ItemPage ID equality
- WikibasePage ID equality
- WbTime year equality
- Coordinate equality, regarding precision
- WbMonolingualText text equality
Expand All @@ -4737,7 +4737,7 @@ def target_equals(self, value):
false otherwise
@rtype: bool
"""
if (isinstance(self.target, pywikibot.ItemPage) and
if (isinstance(self.target, WikibasePage) and
isinstance(value, basestring)):
return self.target.id == value

Expand Down

0 comments on commit f402a44

Please sign in to comment.