Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #2285 -- Tweaked the error message after model errors at "syncd…

…b" time so

that we don't report an app name of "None".


git-svn-id: http://code.djangoproject.com/svn/django/trunk@3276 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 5404e6e93bd46abb1b55bebfe23f2cdbeb373c93 1 parent a778c9d
Malcolm Tredinnick authored July 05, 2006

Showing 1 changed file with 4 additions and 1 deletion. Show diff stats Hide diff stats

  1. 5  django/core/management.py
5  django/core/management.py
@@ -1003,7 +1003,10 @@ def _check_for_validation_errors(app=None):
1003 1003
     s = StringIO()
1004 1004
     num_errors = get_validation_errors(s, app)
1005 1005
     if num_errors:
1006  
-        sys.stderr.write(style.ERROR("Error: %s couldn't be installed, because there were errors in your model:\n" % app))
  1006
+        if app:
  1007
+            sys.stderr.write(style.ERROR("Error: %s couldn't be installed, because there were errors in your model:\n" % app))
  1008
+        else:
  1009
+            sys.stderr.write(style.ERROR("Error: Couldn't install apps, because there were errors in one or more models:\n"))
1007 1010
         s.seek(0)
1008 1011
         sys.stderr.write(s.read())
1009 1012
         sys.exit(1)

0 notes on commit 5404e6e

Please sign in to comment.
Something went wrong with that request. Please try again.