Commit d6dc88cb authored by Aymeric Augustin's avatar Aymeric Augustin
Browse files

Avoided leaking state on exceptions in populate_models().

parent e5c89c62
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line
@@ -125,10 +125,11 @@ class Apps(object):
                    self._postponed.append(app_config)

            if outermost:
                try:
                    for app_config in self._postponed:
                        all_models = self.all_models[app_config.label]
                        app_config.import_models(all_models)

                finally:
                    del self._postponed

                self.clear_cache()