Commit 20640053 authored by André Anjos's avatar André Anjos 💬
Browse files

Merge branch 'fix_asset_hash_generation' into 'master'

[utils] Fix hash generated by storage classes

See merge request !64
parents 6b4b1ec4 611c1515
Pipeline #34644 passed with stages
in 4 minutes and 22 seconds
...@@ -333,17 +333,13 @@ class CodeStorage(AbstractStorage): ...@@ -333,17 +333,13 @@ class CodeStorage(AbstractStorage):
def hash(self): def hash(self):
"""Re-imp""" """Re-imp"""
declaration_hash = hash.hashJSONFile(self.json.path, "description")
if self.code.exists(): if self.code.exists():
return hash.hash( code_hash = hash.hashFileContents(self.code.path)
dict( return hash.hash(dict(declaration=declaration_hash, code=code_hash))
json=hash.hashJSONFile(self.json.path, "description"),
else: else:
return hash.hash( return declaration_hash
dict(json=hash.hashJSONFile(self.json.path, "description"))
def exists(self): def exists(self):
"""Re-imp""" """Re-imp"""
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment