Skip to content
Snippets Groups Projects
Commit 2a46c310 authored by Romin's avatar Romin :eye:
Browse files

Fixed code quality complaints

parent 876675e8
Branches
Tags v0.9.1
No related merge requests found
......@@ -168,7 +168,7 @@ class FileActions:
The URL is valid for 24 hours and requires no authentication.
"""
if "Download" in self._data:
return self._data["Download"]["Url"]
return self._data["Download"]["Url"]
return ""
@property
......
......@@ -722,12 +722,15 @@ class Resource:
for key, values in metadata.items():
for value in values:
valtype: str = value["type"]
value: str = value["value"]
valuestr: str = value["value"]
if valtype == "uri":
rdf_object = rdflib.URIRef(valuestr)
else:
rdflib.Literal(valuestr)
graph.add((
file_reference,
rdflib.URIRef(key),
rdflib.URIRef(value) if valtype == "uri"
else rdflib.Literal(value)
rdf_object
))
#######################################################################
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment