Commits

Anonymous committed 784728e

[soc2010/app-loading] removed app_errors attribute

Comments (0)

Files changed (2)

django/core/apps.py

         if '.' in label:
             label = label.split('.')[-1]
         self.label = label
-        self.errors = {}
+        # errors raised when trying to import the app
+        self.errors = []
         self.models = []
         self.models_module = None
 

django/db/models/loading.py

         # Mapping of app_labels to a dictionary of model names to model code.
         app_models = SortedDict(),
 
-        # Mapping of app_labels to errors raised when trying to import the app.
-        app_errors = {},
-
         # -- Everything below here is only used when populating the cache --
         loaded = False,
         handled = {},
     def get_app_errors(self):
         "Returns the map of known problems with the INSTALLED_APPS."
         self._populate()
-        for app in app_instances:
-            self.app_errors.update(app.errors)
+        errors = {}
+        for app in self.app_instances:
+            if app.errors:
+                errors.update({app.label: app.errors})
         return errors
 
     def get_models(self, app_mod=None, include_auto_created=False, include_deferred=False):