Skip to content
Snippets Groups Projects
Commit 20640053 authored by André Anjos's avatar André Anjos :speech_balloon:
Browse files

Merge branch 'fix_asset_hash_generation' into 'master'

[utils] Fix hash generated by storage classes

See merge request !64
parents 6b4b1ec4 611c1515
No related branches found
No related tags found
1 merge request!64[utils] Fix hash generated by storage classes
Pipeline #34644 passed
......@@ -333,17 +333,13 @@ class CodeStorage(AbstractStorage):
def hash(self):
"""Re-imp"""
declaration_hash = hash.hashJSONFile(self.json.path, "description")
if self.code.exists():
return hash.hash(
dict(
json=hash.hashJSONFile(self.json.path, "description"),
code=hash.hashFileContents(self.code.path),
)
)
code_hash = hash.hashFileContents(self.code.path)
return hash.hash(dict(declaration=declaration_hash, code=code_hash))
else:
return hash.hash(
dict(json=hash.hashJSONFile(self.json.path, "description"))
)
return declaration_hash
def exists(self):
"""Re-imp"""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment