소스 검색

check correctly for existing superadmin

Johannes Zellner 7 년 전
부모
커밋
5cdf3ddc69
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      start.sh

+ 1 - 1
start.sh

@@ -55,7 +55,7 @@ else
 fi
 
 # this is not done on new install path, since old taiga installations would not hit that
-if ! python manage.py shell -c 'from django.contrib.auth import get_user_model; u=get_user_model().objects.filter(is_superuser=True).first(); print(u.username)' | grep admin; then
+if ! python manage.py shell -c 'from django.contrib.auth import get_user_model; u=get_user_model().objects.filter(is_superuser=True).first(); print(u)' | grep -v "None"; then
     echo "=> Create superadmin"
     python manage.py loaddata initial_user
 else