Skip to content

Commit

Permalink
fix: Update to work with latest WikibaseIntegrator
Browse files Browse the repository at this point in the history
  • Loading branch information
dpriskorn committed Aug 7, 2024
1 parent 1b5b9f3 commit 3802d26
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions src/models/trail_item.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import config
from src.console import console
from src.enums import ItemEnum, OsmIdSource, Property, Status
from src.exceptions import NoItemError, SummaryError, WBIError
from src.exceptions import NoItemError, SummaryError
from src.models.osm_wikidata_link_result import OsmWikidataLinkResult
from src.models.osm_wikidata_link_return import OsmWikidataLinkReturn
from src.models.project_base_model import ProjectBaseModel
Expand Down Expand Up @@ -62,14 +62,11 @@ class Config:

@property
def has_osm_way_property(self) -> bool:
try:
if not self.item:
raise NoItemError()
if self.item.claims.get(property="P10689"):
return True
else:
raise WBIError("This should never happen")
except KeyError:
if not self.item:
raise NoItemError()
if self.item.claims.get(property="P10689"):
return True
else:
return False

@property
Expand Down

0 comments on commit 3802d26

Please sign in to comment.