From 09dafa68bfd371f5d3a531f35b1f4aa90fa2167d Mon Sep 17 00:00:00 2001 From: Wolfgang Fahl Date: Tue, 11 Jun 2024 07:03:03 -0600 Subject: [PATCH] fixes clear and add msg in loop for adding volumes --- ceurws/version.py | 2 +- ceurws/volume_view.py | 14 ++++++++++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/ceurws/version.py b/ceurws/version.py index 912d6b2..0cd073c 100644 --- a/ceurws/version.py +++ b/ceurws/version.py @@ -18,7 +18,7 @@ class Version: name = "CEUR-WS Volume Browser" version = ceurws.__version__ date = "2022-08-14" - updated = "2024-03-13" + updated = "2024-06-11" description = "CEUR-WS Volume browser" authors = "Tim Holzheim, Wolfgang Fahl" diff --git a/ceurws/volume_view.py b/ceurws/volume_view.py index 79bf578..5255a92 100644 --- a/ceurws/volume_view.py +++ b/ceurws/volume_view.py @@ -278,14 +278,14 @@ def add_msg(self, html_markup: str): def updateWikidataVolumes(self,selected_rows): """ - update wikidata volumes + update wikidata volumes for the selected rows """ try: + msg = f"{len(selected_rows)} Volumes selected
" + self.clear_msg(msg) for row in selected_rows: vol_number = row["#"] - volume = self.wdSync.volumesByNumber[vol_number] - msg = f"{len(selected_rows)} Volumes selected
" - self.clear_msg(msg) + volume = self.wdSync.volumesByNumber[vol_number] self.add_or_update_volume_in_wikidata(volume) pass except Exception as ex: @@ -377,6 +377,12 @@ def get_volume_lod(self): ) def add_or_update_volume_in_wikidata(self, volume: Volume): + """ + add the given volume to wikidata or update it if it already exists + + Args: + volume(Volume): the CEUR-WS volume to update proceedings and event entries for + """ try: msg = f"trying to add Volume {volume.number} to wikidata" with self.parent: