@@ -67,7 +67,11 @@ def handle(self, *args, **options):
67
67
if self .verbosity >= 1 :
68
68
self .stdout .write (self .COMMAND_HINT )
69
69
70
- self ._process (to_process , batch_size = options ["batchsize" ], default_date = options ["default_date" ])
70
+ self ._process (
71
+ to_process ,
72
+ batch_size = options ["batchsize" ],
73
+ default_date = options ["default_date" ],
74
+ )
71
75
72
76
def _auto_models (self ):
73
77
to_process = set ()
@@ -143,7 +147,9 @@ def _bulk_history_create(self, model, batch_size, default_date=None):
143
147
# creating them. So we only keep batch_size worth of models in
144
148
# historical_instances and clear them after we hit batch_size
145
149
if index % batch_size == 0 :
146
- history .bulk_history_create (instances , batch_size = batch_size , default_date = default_date )
150
+ history .bulk_history_create (
151
+ instances , batch_size = batch_size , default_date = default_date
152
+ )
147
153
148
154
instances = []
149
155
@@ -159,7 +165,9 @@ def _bulk_history_create(self, model, batch_size, default_date=None):
159
165
160
166
# create any we didn't get in the last loop
161
167
if instances :
162
- history .bulk_history_create (instances , batch_size = batch_size , default_date = default_date )
168
+ history .bulk_history_create (
169
+ instances , batch_size = batch_size , default_date = default_date
170
+ )
163
171
164
172
def _process (self , to_process , batch_size , default_date = None ):
165
173
for model , history_model in to_process :
0 commit comments