@@ -179,13 +179,15 @@ def update_supernav():
179179 'last_updated' : timezone .now (),
180180 })
181181
182- box , _ = Box .objects .update_or_create (
182+ box , created = Box .objects .update_or_create (
183183 label = 'supernav-python-downloads' ,
184184 defaults = {
185185 'content' : content ,
186186 'content_markup_type' : 'html' ,
187187 }
188188 )
189+ if not created :
190+ box .save ()
189191
190192
191193def update_download_landing_sources_box ():
@@ -208,13 +210,15 @@ def update_download_landing_sources_box():
208210 return
209211
210212 source_content = render_to_string ('downloads/download-sources-box.html' , context )
211- source_box , _ = Box .objects .update_or_create (
213+ source_box , created = Box .objects .update_or_create (
212214 label = 'download-sources' ,
213215 defaults = {
214216 'content' : source_content ,
215217 'content_markup_type' : 'html' ,
216218 }
217219 )
220+ if not created :
221+ source_box .save ()
218222
219223
220224def update_homepage_download_box ():
@@ -234,13 +238,15 @@ def update_homepage_download_box():
234238
235239 content = render_to_string ('downloads/homepage-downloads-box.html' , context )
236240
237- box , _ = Box .objects .update_or_create (
241+ box , created = Box .objects .update_or_create (
238242 label = 'homepage-downloads' ,
239243 defaults = {
240244 'content' : content ,
241245 'content_markup_type' : 'html' ,
242246 }
243247 )
248+ if not created :
249+ box .save ()
244250
245251
246252@receiver (post_save , sender = Release )
0 commit comments