summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--askbot/migrations/0127_save_category_tree_as_json.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/askbot/migrations/0127_save_category_tree_as_json.py b/askbot/migrations/0127_save_category_tree_as_json.py
index 34aba9c4..4e845075 100644
--- a/askbot/migrations/0127_save_category_tree_as_json.py
+++ b/askbot/migrations/0127_save_category_tree_as_json.py
@@ -78,8 +78,9 @@ class Migration(DataMigration):
old_data = ''
json_data = parse_tree(old_data)
- json_string = simplejson.dumps(json_data)
- askbot_settings.update('CATEGORY_TREE', json_string)
+ json_string = simplejson.dumps(json_data).replace(' ', '')
+ if json_string.replace(' ', '') != askbot_settings.CATEGORY_TREE:
+ askbot_settings.update('CATEGORY_TREE', json_string)
def backwards(self, orm):
"Write your backwards methods here."