Skip to content

Commit f7949ee

Browse files
author
Hans-Chrstian
committed
Remove support when numeric value is returned by wikidata
1 parent b3fcf8a commit f7949ee

File tree

2 files changed

+1
-8
lines changed

2 files changed

+1
-8
lines changed

ckanext/fairdatapoint/labels.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,6 @@ def resolve_labels(package_dict: dict) -> int:
6969

7070
if "success" not in updated_labels:
7171
log.warning("Error updating labels: %s", updated_labels)
72-
if updated_labels["success"].isnumeric():
73-
if not (len(translation_list) == int(updated_labels["success"])):
74-
log.warning(
75-
"Of %d labels, only %s updated successfully",
76-
len(translation_list),
77-
updated_labels["success"],
78-
)
7972
else:
8073
log.debug("Updated %s labels in database", updated_labels["success"])
8174
return len(translation_list)

ckanext/fairdatapoint/tests/test_labels.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ def test_resolve_label_happy_flow(
121121
]
122122

123123
load_and_translate_uri.return_value = translation_list
124-
get_action.return_value.return_value = {"success": "3"}
124+
get_action.return_value.return_value = {"success": "3 updated succesfully"}
125125

126126
assert resolve_labels({"theme": "http://www.wikidata.org/entity/Q29937289"}) == 3
127127

0 commit comments

Comments
 (0)