Open
Description
Describe the bug
Running migrations with Django 5.0+ results in the error:
TypeError: 'class Meta' got invalid attribute(s): index_together.
This occurs because index_together
was deprecated in Django 4.2 and removed in Django 5.0 .
Steps To Reproduce
Steps to reproduce the behavior:
Replace the deprecated index_together
with the modern indexes
syntax in the Meta
class of AbstractUser
:
indexes = [
models.Index(fields=['id', 'email']),
]
Expected behavior
A clear and concise description of what you expected to happen.
Affected Files
openwisp_users/base/models.py
System Informatioon:
- OS: [Ubuntu 20.04 LTS]
- Python Version: [Python 3.11]
- Django Version: [Django 5.1.0]