diff --git a/openwisp_users/base/models.py b/openwisp_users/base/models.py index b654c173..846f4289 100644 --- a/openwisp_users/base/models.py +++ b/openwisp_users/base/models.py @@ -73,7 +73,9 @@ class AbstractUser(BaseUser): class Meta(BaseUser.Meta): abstract = True - index_together = ('id', 'email') + indexes = [ + models.Index(fields=['id', 'email']), + ] @staticmethod def _get_pk(obj):