mirror of
https://github.com/GSA/notifications-api.git
synced 2026-09-06 13:38:25 -04:00
lazy init encryption
This commit is contained in:
@@ -9,7 +9,7 @@ from sqlalchemy.ext.declarative import DeclarativeMeta, declared_attr
|
|||||||
from sqlalchemy.orm import validates
|
from sqlalchemy.orm import validates
|
||||||
from sqlalchemy.orm.collections import attribute_mapped_collection
|
from sqlalchemy.orm.collections import attribute_mapped_collection
|
||||||
|
|
||||||
from app import db, encryption
|
from app import db, get_encryption
|
||||||
from app.enums import (
|
from app.enums import (
|
||||||
AgreementStatus,
|
AgreementStatus,
|
||||||
AgreementType,
|
AgreementType,
|
||||||
@@ -48,6 +48,8 @@ from notifications_utils.recipients import (
|
|||||||
)
|
)
|
||||||
from notifications_utils.template import PlainTextEmailTemplate, SMSMessageTemplate
|
from notifications_utils.template import PlainTextEmailTemplate, SMSMessageTemplate
|
||||||
|
|
||||||
|
encryption = get_encryption()
|
||||||
|
|
||||||
|
|
||||||
def filter_null_value_fields(obj):
|
def filter_null_value_fields(obj):
|
||||||
return dict(filter(lambda x: x[1] is not None, obj.items()))
|
return dict(filter(lambda x: x[1] is not None, obj.items()))
|
||||||
|
|||||||
Reference in New Issue
Block a user