Added a check in migrate_app to see if the app is a string or not.

This commit is contained in:
Corey Oordt 2011-08-19 10:13:18 -04:00
parent 309accf3e0
commit 7cb74829ea

View file

@ -11,8 +11,10 @@ def migrate_app(app, *args, **kwargs):
Migrate all models of this app registered
"""
# pull the information from the registry
if not isinstance(app, basestring):
return
fields = [fld for fld in field_registry.keys() if fld.startswith(app)]
# call the south commands to add the fields/tables
for fld in fields:
app_name, model_name, field_name = fld.split('.')