Skip to content

Commit 8a3ccf5

Browse files
committed
Code review updates
1 parent 01ec095 commit 8a3ccf5

File tree

1 file changed

+2
-13
lines changed

1 file changed

+2
-13
lines changed

django_mongodb_backend/schema.py

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -471,19 +471,8 @@ def _create_collection(self, model):
471471
f"Encrypted fields found but DATABASES['{self.connection.alias}']['OPTIONS'] "
472472
"is missing auto_encryption_opts."
473473
)
474-
475-
encrypted_fields_map = getattr(auto_encryption_opts, "_encrypted_fields_map", None)
476-
477-
if not encrypted_fields_map:
478-
encrypted_fields = self._get_encrypted_fields(model)
479-
else:
480-
encrypted_fields = encrypted_fields_map.get(db_table)
481-
482-
if encrypted_fields:
483-
db.create_collection(db_table, encryptedFields=encrypted_fields)
484-
else:
485-
db.create_collection(db_table)
486-
474+
encrypted_fields = self._get_encrypted_fields(model)
475+
db.create_collection(db_table, encryptedFields=encrypted_fields)
487476
else:
488477
# Unencrypted path
489478
db.create_collection(db_table)

0 commit comments

Comments
 (0)