Permalink
Browse files

fixed migration bug

  • Loading branch information...
sherzberg committed Aug 6, 2011
1 parent cecdb19 commit 249b0293eb2934c64b1e085e9b04365674bea23b
Showing with 3 additions and 7 deletions.
  1. +3 −7 emailer/migrations/0010_convert_merge_data.py
@@ -11,10 +11,8 @@ def forwards(self, orm):
import cPickle as pickle
except ImportError:
import pickle
-
- from emailer.models import Email
- for email in Email.objects.all():
+ for email in orm.Email.objects.all():
email.merge_data = pickle.dumps(eval(email.merge_data))
email.save()
@@ -23,10 +21,8 @@ def backwards(self, orm):
import cPickle as pickle
except ImportError:
import pickle
-
- from emailer.models import Email
-
- for email in Email.objects.all():
+
+ for email in orm.Email.objects.all():
email.merge_data = str(email.merge_data)
email.save()

0 comments on commit 249b029

Please sign in to comment.