Skip to content

Commit

Permalink
fix: problem with type casting
Browse files Browse the repository at this point in the history
  • Loading branch information
Hans-Chrstian committed Nov 21, 2024
1 parent a09801c commit 56faa3c
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions ckanext/fairdatapoint/labels.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,13 @@ def resolve_labels(package_dict: dict) -> int:

if "success" not in updated_labels:
log.warning("Error updating labels: %s", updated_labels)

elif not (len(translation_list) == int(updated_labels["success"])):
log.warning(
"Of %d labels, only %d updated successfully",
len(translation_list),
updated_labels["success"],
)
if updated_labels["success"].isinteger():
if not (len(translation_list) == int(updated_labels["success"])):
log.warning(
"Of %d labels, only %s updated successfully",
len(translation_list),
updated_labels["success"],
)
else:
log.debug("Updated %s labels in database", updated_labels["success"])
return len(translation_list)
Expand Down

0 comments on commit 56faa3c

Please sign in to comment.