mirror of
https://github.com/ansible/awx-operator.git
synced 2026-03-26 21:33:14 +00:00
django: Add --no-imports option
With django updated to 5.2 then the django shell commands load imports at startup which flood stdout with logs and break workflows https://docs.djangoproject.com/en/dev/releases/5.2/#automatic-models-import-in-the-shell Adding --no-imports to the cli call solves the issue. https://docs.djangoproject.com/en/5.2/ref/django-admin/#cmdoption-shell-no-imports Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
This commit is contained in:
committed by
Dimitri Savineau
parent
a47b06f937
commit
eeed2b8ae5
@@ -8,7 +8,7 @@
|
||||
bash -c "echo 'from django.contrib.auth.models import User;
|
||||
nsu = User.objects.filter(is_superuser=True, username=\"{{ admin_user }}\").count();
|
||||
exit(0 if nsu > 0 else 1)'
|
||||
| awx-manage shell"
|
||||
| awx-manage shell --no-imports"
|
||||
ignore_errors: true
|
||||
register: users_result
|
||||
changed_when: users_result.return_code > 0
|
||||
|
||||
Reference in New Issue
Block a user