Skip to content

Commit

Permalink
makes more robust
Browse files Browse the repository at this point in the history
  • Loading branch information
WolfgangFahl committed Mar 13, 2024
1 parent 3d28172 commit 05ba98a
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions ceurws/wikidata_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,16 +52,19 @@ def reload_aggrid(self,olod:List):
lod = []
for row in reverseLod:
volume = self.getRowValue(row, "sVolume")
if volume == "?":
if volume == self.noneValue:
volume = self.getRowValue(row, "Volume")
volNumber = "?"
if volume != "?":
volNumber = int(volume)
volumeLink = self.createLink(
f"http://ceur-ws.org/Vol-{volume}", f"Vol-{volNumber:04}"
)
volNumber = self.noneValue
if volume != self.noneValue:
try:
volNumber = int(volume)
volumeLink = self.createLink(
f"http://ceur-ws.org/Vol-{volume}", f"Vol-{volNumber:04}"
)
except Exception as _ex:
volumeLink = self.noneValue
else:
volumeLink = "?"
volumeLink = self.noneValue
itemLink = self.createItemLink(row, "item")
eventLink = self.createItemLink(row, "event", separator="|")
eventSeriesLink = self.createItemLink(row, "eventSeries", separator="|")
Expand Down

0 comments on commit 05ba98a

Please sign in to comment.