-
Type:
Task
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: django
-
None
-
Python Drivers
-
None
-
None
-
None
-
None
-
None
-
None
Accessing the admin changelist of an encrypted model (e.g. /admin/encrypt/patient/) fails with the error: Aggregation stage $internalFacetTeeConsumer is not allowed or supported with automatic encryption.
This message occurs when calling QuerySet.count() on an encrypted model.
This may be fixed by using a custom ModelAdmin for encrypted models. Along with setting ModelAdmin.setting show_full_result_count = False, the ModelAdmin needs a custom paginator that uses len(objects_list) instead of count(). This code is likely already out there.