do not server error if this value is None

This commit is contained in:
AlanCoding 2018-04-10 11:00:37 -04:00
parent ea900b6f95
commit 4f65b283df
No known key found for this signature in database
GPG Key ID: FD2C3C012A72926B

View File

@ -839,6 +839,6 @@ class OAuth2ClientSecretField(models.CharField):
)
def from_db_value(self, value, expression, connection, context):
if value.startswith('$encrypted$'):
if value and value.startswith('$encrypted$'):
return decrypt_value(get_encryption_key('value', pk=None), value)
return value