@@ -88,7 +88,7 @@ def add_operation(self, app_label, operation, dependencies=None, beginning=False
88
88
),
89
89
file = sys .stderr ,
90
90
)
91
- choice = self .questioner .defaults .get ("ask_rename_field_stage" , 0 )
91
+ choice = self .questioner .defaults .get ("ask_rename_field_stage" , 1 )
92
92
if self .has_interactive_questionner :
93
93
choice = self .questioner ._choice_input (
94
94
"Please choose an appropriate action to take:" ,
@@ -113,10 +113,10 @@ def add_operation(self, app_label, operation, dependencies=None, beginning=False
113
113
),
114
114
],
115
115
)
116
- if choice == 0 :
116
+ if choice == 1 :
117
117
sys .exit (3 )
118
118
else :
119
- stage = Stage .PRE_DEPLOY if choice == 1 else Stage .POST_DEPLOY
119
+ stage = Stage .PRE_DEPLOY if choice == 2 else Stage .POST_DEPLOY
120
120
operation = RenameField .for_stage (operation , stage )
121
121
if isinstance (operation , operations .RenameModel ):
122
122
from_db_table = (
@@ -135,7 +135,7 @@ def add_operation(self, app_label, operation, dependencies=None, beginning=False
135
135
),
136
136
file = sys .stderr ,
137
137
)
138
- choice = self .questioner .defaults .get ("ask_rename_model_stage" , 0 )
138
+ choice = self .questioner .defaults .get ("ask_rename_model_stage" , 1 )
139
139
if self .has_interactive_questionner :
140
140
choice = self .questioner ._choice_input (
141
141
"Please choose an appropriate action to take:" ,
@@ -161,10 +161,10 @@ def add_operation(self, app_label, operation, dependencies=None, beginning=False
161
161
),
162
162
],
163
163
)
164
- if choice == 0 :
164
+ if choice == 1 :
165
165
sys .exit (3 )
166
166
else :
167
- stage = Stage .PRE_DEPLOY if choice == 1 else Stage .POST_DEPLOY
167
+ stage = Stage .PRE_DEPLOY if choice == 2 else Stage .POST_DEPLOY
168
168
operation = RenameModel .for_stage (operation , stage )
169
169
elif isinstance (operation , operations .AlterField ) and not operation .field .null :
170
170
# Addition of not-NULL constraints must be performed post-deployment.
0 commit comments