-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf: Don't count users when CMS_RAW_ID_USERS=True (#7414)
* perf: Don't count users when CMS_RAW_ID_USERS=True When using CMS_RAW_ID_USERS=True on a Postgres database with many users, counting the users is slow and will always yield the same result. Only count users when using an integer value as a threshold and reuse the same logic for both PagePermissionInlineAdmin and GlobalPagePermissionAdmin. * Ensure that only integer settings of CMS_RAW_ID_USERS are compared to the number of users * Add documentation for the CMS_RAW_ID_USER=True setting * fix isort for added tests * Fix: in python this is always True: isinstance(False, int) Co-authored-by: Pankrat <lhaehne@gmail.com>
- Loading branch information
Showing
4 changed files
with
89 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters