Fixed remaining issues with migrating the attribute changes.

This commit is contained in:
Griatch 2013-04-14 00:35:23 +02:00
parent 230d73cfa0
commit 82c2e19ed5
2 changed files with 20 additions and 16 deletions

View file

@ -334,6 +334,10 @@ def to_attr(data):
class Migration(DataMigration):
depends_on = (
("objects", "0018_add_picklefield"),
)
def forwards(self, orm):
"Write your forwards methods here."
# Note: Remember to use orm['appname.ModelName'] rather than "from appname.models..."
@ -361,8 +365,7 @@ class Migration(DataMigration):
"""
Convert db-stored dbref back to object
"""
mclass = orm[data.db_model].model_class()
#mclass = CTYPEGET(model=data.db_model).model_class()
mclass = CTYPEGET(model=data.db_model).model_class()
try:
return mclass.objects.get(id=data.id)