From b0902b0e219e862ed82ed08dc4b7e299545fcff2 Mon Sep 17 00:00:00 2001 From: Enric Tobella Date: Wed, 18 May 2022 20:04:11 +0200 Subject: [PATCH] [FIX] dms_file: Fix inverse --- dms/models/dms_file.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dms/models/dms_file.py b/dms/models/dms_file.py index c6c8df872..0b39b5791 100644 --- a/dms/models/dms_file.py +++ b/dms/models/dms_file.py @@ -221,7 +221,7 @@ def _update_content_vals(self, vals, binary): ) if self.storage_id.save_type in ["file", "attachment"]: new_vals["content_file"] = self.content - else: + elif self.storage_id.save_type == "database": new_vals["content_binary"] = self.content and binary return new_vals