diff options
author | Evgeny Fadeev <evgeny.fadeev@gmail.com> | 2013-08-16 22:59:11 -0400 |
---|---|---|
committer | Evgeny Fadeev <evgeny.fadeev@gmail.com> | 2013-08-16 22:59:11 -0400 |
commit | 13bab661aa2e2606405948ad6e104cf0d14a8c78 (patch) | |
tree | 80f25662899a2b3b816c84b33135d3e0d1d5223a | |
parent | 995eff86aee489efd16138d5fa9dbee843330e7e (diff) | |
download | askbot-13bab661aa2e2606405948ad6e104cf0d14a8c78.tar.gz askbot-13bab661aa2e2606405948ad6e104cf0d14a8c78.tar.bz2 askbot-13bab661aa2e2606405948ad6e104cf0d14a8c78.zip |
small modification to migration 127
-rw-r--r-- | askbot/migrations/0127_save_category_tree_as_json.py | 5 |
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." |