Skip to content

Commit

Permalink
Create Ontologies dictionary if it not exists.
Browse files Browse the repository at this point in the history
THis dictionary is needed for unzipping and retrieving a specific
ontology file. Otherwise, the appliaction throws an error.
  • Loading branch information
Achim Reiz committed Aug 12, 2022
1 parent b9ef092 commit 1fbb8cc
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Git-Extension/rest/CalculationManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,7 @@ def downloadSpecificOntologyFile(self, pkCommit: int)->dict:
commit = Commit.objects.get(id=pkCommit)
ontology = commit.metricSource
repository = ontology.repository
os.makedirs('ontologies', exist_ok=True)
internalOntologyUrl = "ontologies/" + str(hash(commit.CommitID))
shutil.copy(repository.gitRepositoryFile.path, internalOntologyUrl+ "_packed.zip")
shutil.unpack_archive( internalOntologyUrl + "_packed.zip", internalOntologyUrl)
Expand Down

0 comments on commit 1fbb8cc

Please sign in to comment.