Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fixed migration bug

  • Loading branch information...
commit 249b0293eb2934c64b1e085e9b04365674bea23b 1 parent cecdb19
@sherzberg sherzberg authored
Showing with 3 additions and 7 deletions.
  1. +3 −7 emailer/migrations/0010_convert_merge_data.py
View
10 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()
Please sign in to comment.
Something went wrong with that request. Please try again.