From d2d3a66ab13d07f45ac9c14c652df8003ffb4e22 Mon Sep 17 00:00:00 2001 From: Hugo LEVY-FALK Date: Thu, 22 Feb 2018 19:52:32 +0100 Subject: [PATCH] =?UTF-8?q?R=C3=A9pare=20le=20champ=20AESField=20(test=20d?= =?UTF-8?q?e=20value=20inutile)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- preferences/aes_field.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/preferences/aes_field.py b/preferences/aes_field.py index 81f8accc..8b8f7f9d 100644 --- a/preferences/aes_field.py +++ b/preferences/aes_field.py @@ -33,8 +33,6 @@ def decrypt(key, s): class AESEncryptedField(models.CharField): def save_form_data(self, instance, data): - if value is None: - return value setattr(instance, self.name, binascii.b2a_base64(encrypt(settings.AES_KEY, data)))