As described in #63 and #64 there is an issue with the way django optimizes queries when aggregating that does not work for TenantModels. This uses the fix and test originally contributed by @ledburyb in #64. However, it makes the test work on Python 3 and also changes it to use a better fix for Django 3.0+.
As described in #63 and #64 there is an issue with the way django optimizes queries when aggregating that does not work for
TenantModel
s. This uses the fix and test originally contributed by @ledburyb in #64. However, it makes the test work on Python 3 and also changes it to use a better fix for Django 3.0+.Closes #63 Closes #64