kopia lustrzana https://github.com/OpenDroneMap/WebODM
Added missing fixture, changed first superuser logic check
rodzic
4923a507c9
commit
1a3bb07b1e
|
@ -7,7 +7,7 @@ from django.contrib.auth.models import User
|
|||
|
||||
class TestApi(TestCase):
|
||||
|
||||
fixtures = ['test_users', ]
|
||||
fixtures = ['test_users', 'test_projects', ]
|
||||
|
||||
def setUp(self):
|
||||
Project(
|
||||
|
|
|
@ -21,7 +21,7 @@ def boot():
|
|||
)
|
||||
|
||||
# Check super user
|
||||
if User.objects.count() == 0:
|
||||
if User.objects.filter(is_superuser=True).count() == 0:
|
||||
User.objects.create_superuser('admin', 'admin@example.com', 'admin')
|
||||
logger.info("Created superuser")
|
||||
except ProgrammingError:
|
||||
|
|
Ładowanie…
Reference in New Issue