Skip to content

Commit

Permalink
exclude empty strings from rdf graph parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
sblack-usu committed Nov 16, 2021
1 parent 471476e commit ec00367
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion hsmodels/schemas/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,10 @@ def class_rdf_type(schema):
elif f.sub_fields:
parsed.append([])
else:
parsed_value = str(value.toPython())
# primitive value
parsed.append(str(value.toPython()))
if parsed_value:
parsed.append(parsed_value)
if len(parsed) > 0:
if f.sub_fields:
# list
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

setup(
name='hsmodels',
version='0.4.1',
version='0.4.2',
packages=find_packages(include=['hsmodels', 'hsmodels.*', 'hsmodels.schemas.*', 'hsmodels.schemas.rdf.*'],
exclude=("tests",)),
install_requires=[
Expand Down

0 comments on commit ec00367

Please sign in to comment.