Skip to content

Commit 2b02ace

Browse files
Update ckanext/fairdatapoint/harvesters/domain/identifier.py
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
1 parent 2739d1e commit 2b02ace

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ckanext/fairdatapoint/harvesters/domain/identifier.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ def get_id_value(self) -> str:
3030
def get_part(self, index: int) -> str:
3131
key_values = self.guid.split(SEPARATOR)
3232

33-
if not key_values:
33+
if not self.guid.strip() or key_values == ['']:
3434
raise IdentifierException(
35-
f"Unexpected number of parts in record identifier [{self.guid}]: [{len(key_values)}]"
35+
f"Empty or improperly formatted record identifier: [{self.guid}]"
3636
)
3737

3838
key_value = key_values[-1].split(KEY_VALUE_SEPARATOR, 1)

0 commit comments

Comments
 (0)