@@ -95,7 +95,7 @@ def load_app(self, app):
9595 return self .loaded_apps [app ]
9696
9797 @atomic
98- def update_app (self , app , handle_deletions = True ):
98+ def update_app (self , app ):
9999 """
100100 Loads and runs `update_initial_data` of the specified app. Any dependencies contained within the
101101 initial data class will be run recursively. Dependency cycles are checked for and a cache is built
@@ -122,7 +122,7 @@ def update_app(self, app, handle_deletions=True):
122122
123123 # update initial data of dependencies
124124 for dependency in dependencies :
125- self .update_app (dependency , handle_deletions = False )
125+ self .update_app (dependency )
126126
127127 self .log ('Updating app {0}' .format (app ))
128128
@@ -139,11 +139,6 @@ def update_app(self, app, handle_deletions=True):
139139 # keep track that this app has been updated
140140 self .updated_apps .add (app )
141141
142- # Handle deletions if necessary, this could be a single call that was nat batched with multiple updates
143- # We cannot handle this case yet since we do not know what app registered what deletions
144- # if handle_deletions:
145- # self.handle_deletions()
146-
147142 def handle_deletions (self ):
148143 """
149144 Manages handling deletions of objects that were previously managed by the initial data process but no longer
@@ -190,13 +185,8 @@ def update_all_apps(self):
190185 Loops through all app names contained in settings.INSTALLED_APPS and calls `update_app`
191186 on each one. Handles any object deletions that happened after all apps have been initialized.
192187 """
193-
194- # Loop over all the apps and update each one, buffering the deletions until the end
195188 for app in apps .get_app_configs ():
196- self .update_app (
197- app = app .name ,
198- handle_deletions = False
199- )
189+ self .update_app (app .name )
200190
201191 # During update_app, all apps added model objects that were registered for deletion.
202192 # Delete all objects that were previously managed by the initial data process
0 commit comments