File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -425,13 +425,14 @@ def _create_collection(self, model):
425
425
create an encrypted collection with the encrypted fields map.
426
426
"""
427
427
428
+ db = self .get_database ()
428
429
if not hasattr (model , "encrypted" ):
429
- self . get_database () .create_collection (model ._meta .db_table )
430
+ db .create_collection (model ._meta .db_table )
430
431
else :
431
432
client = self .connection .connection
432
- client_encryption = get_client_encryption (client )
433
- client_encryption .create_encrypted_collection (
434
- client . database ,
433
+ ce = get_client_encryption (client )
434
+ ce .create_encrypted_collection (
435
+ db ,
435
436
model ._meta .db_table ,
436
437
self ._get_encrypted_fields_map (model ),
437
438
"local" , # TODO: KMS provider should be configurable
You can’t perform that action at this time.
0 commit comments