Browse Source

[FIX] bug of compute internal_hash

pull/376/head
Mourad Elhadj Mimoune 8 years ago
parent
commit
27e077f6ed
  1. 2
      attachment_metadata/models/attachment.py

2
attachment_metadata/models/attachment.py

@ -36,7 +36,7 @@ class IrAttachmentMetadata(models.Model):
for attachment in self:
if attachment.datas:
attachment.internal_hash = hashlib.md5(
b64decode(self.datas)).hexdigest()
b64decode(attachment.datas)).hexdigest()
if attachment.external_hash and\
attachment.internal_hash != attachment.external_hash:
raise UserError(

Loading…
Cancel
Save