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):
425425 create an encrypted collection with the encrypted fields map.
426426 """
427427
428+ db = self .get_database ()
428429 if not hasattr (model , "encrypted" ):
429- self . get_database () .create_collection (model ._meta .db_table )
430+ db .create_collection (model ._meta .db_table )
430431 else :
431432 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 ,
435436 model ._meta .db_table ,
436437 self ._get_encrypted_fields_map (model ),
437438 "local" , # TODO: KMS provider should be configurable
You can’t perform that action at this time.
0 commit comments