You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is silent if the decryption process fails. It should not be as there is no good reason for the encryption process to fail (and if it does it is important to let the user know).
I would change this code to raise a SuspiciousOperation exception.
The one nice thing of it failing silently, is that it allows you to change the field type to the encrypted field while still reading older unencrypted values. Raising an error might make it a little bit more difficult to migrate old columns.
The Python Zen states
The following code
Is silent if the decryption process fails. It should not be as there is no good reason for the encryption process to fail (and if it does it is important to let the user know).
I would change this code to raise a
SuspiciousOperation
exception.https://docs.djangoproject.com/en/1.8/ref/exceptions/#suspiciousoperation
The text was updated successfully, but these errors were encountered: