summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomasz Zielinski <tomasz.zielinski@pyconsultant.eu>2012-01-09 22:28:29 +0100
committerTomasz Zielinski <tomasz.zielinski@pyconsultant.eu>2012-01-09 22:28:29 +0100
commiteef7c1dc7d5f9d6f6033eae029565fefe82db28e (patch)
tree05e51ff8c2049e0f3d142a9e5487e4a0584d5f51
parenta8e9da48209df9834c6a717acffb918e4c14403c (diff)
downloadaskbot-eef7c1dc7d5f9d6f6033eae029565fefe82db28e.tar.gz
askbot-eef7c1dc7d5f9d6f6033eae029565fefe82db28e.tar.bz2
askbot-eef7c1dc7d5f9d6f6033eae029565fefe82db28e.zip
Migrations fix to avoid buggy unicode keyword parameters
-rw-r--r--askbot/migrations/0092_postize_vote_and_activity.py2
-rw-r--r--askbot/migrations/0095_postize_award_and_repute.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/askbot/migrations/0092_postize_vote_and_activity.py b/askbot/migrations/0092_postize_vote_and_activity.py
index a4cf3e4e..556ef18a 100644
--- a/askbot/migrations/0092_postize_vote_and_activity.py
+++ b/askbot/migrations/0092_postize_vote_and_activity.py
@@ -47,7 +47,7 @@ class Migration(DataMigration):
ct = a.content_type
if ct.app_label == 'askbot' and ct.model in ('question', 'answer', 'comment'):
a.content_type = ct_post
- a.object_id = orm.Post.objects.get(**{'self_%s__id' % ct.model: a.object_id}).id
+ a.object_id = orm.Post.objects.get(**{'self_%s__id' % str(ct.model): a.object_id}).id
save = True
if a.question:
diff --git a/askbot/migrations/0095_postize_award_and_repute.py b/askbot/migrations/0095_postize_award_and_repute.py
index bca50617..0071199c 100644
--- a/askbot/migrations/0095_postize_award_and_repute.py
+++ b/askbot/migrations/0095_postize_award_and_repute.py
@@ -15,7 +15,7 @@ class Migration(DataMigration):
ct = aw.content_type
if ct.app_label == 'askbot' and ct.model in ('question', 'answer', 'comment'):
aw.content_type = ct_post
- aw.object_id = orm.Post.objects.get(**{'self_%s__id' % ct.model: aw.object_id}).id
+ aw.object_id = orm.Post.objects.get(**{'self_%s__id' % str(ct.model): aw.object_id}).id
aw.save()
###