06/04 Optimize app

This commit is contained in:
2026-06-04 10:48:31 -04:00
parent 3abd073437
commit 8bed900297
6 changed files with 22 additions and 11 deletions
+1 -5
View File
@@ -35,11 +35,7 @@ class EncryptedText(types.TypeDecorator):
def process_bind_param(self, value, dialect):
if value is None:
return None
try:
return _fernet().encrypt(value.encode()).decode()
except Exception as exc:
log.warning('[crypto] encrypt failed: %s', exc)
return value # store plaintext rather than lose data
return _fernet().encrypt(value.encode()).decode()
def process_result_value(self, value, dialect):
if value is None: