Skip to content

Commit

Permalink
Merge pull request #63 from acdh-oeaw/58-differ-between-conceptscheme…
Browse files Browse the repository at this point in the history
…-identifier-and-base-uri

58 differ between conceptscheme identifier and base uri
  • Loading branch information
csae8092 authored Dec 22, 2022
2 parents f12b8a7 + 6cd3d32 commit 1591d1b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion vocabs/rdf_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def graph_construct_qs(results):
for obj in results:
# Creating Main Concept Scheme
if obj.scheme:
if obj.scheme.legacy_id is not None:
if obj.scheme.legacy_id:
main_concept_scheme = URIRef(obj.scheme.legacy_id)
else:
main_concept_scheme = URIRef(obj.scheme.identifier)
Expand Down
2 changes: 2 additions & 0 deletions vocabs/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,11 @@ def handle_uploaded_file(file):


def delete_legacy_ids(concept_scheme):
concept_scheme.legacy_id = ""
for x in concept_scheme.has_concepts.all():
x.legacy_id = ""
x.save()
concept_scheme.save()
return "done"


Expand Down

0 comments on commit 1591d1b

Please sign in to comment.