diff options
author | Evgeny Fadeev <evgeny.fadeev@gmail.com> | 2013-05-04 00:09:42 -0400 |
---|---|---|
committer | Evgeny Fadeev <evgeny.fadeev@gmail.com> | 2013-05-04 00:09:42 -0400 |
commit | 8e2957aa78ddfa10b941c313e55771fcf4b36d6f (patch) | |
tree | 530d947a80a6f7061d15c79e6c407d4d6c498bcf /askbot/migrations | |
parent | ae888776f39839328a3b728bbca59831dbe6184c (diff) | |
download | askbot-8e2957aa78ddfa10b941c313e55771fcf4b36d6f.tar.gz askbot-8e2957aa78ddfa10b941c313e55771fcf4b36d6f.tar.bz2 askbot-8e2957aa78ddfa10b941c313e55771fcf4b36d6f.zip |
fixed the dummy tag issue
Diffstat (limited to 'askbot/migrations')
-rw-r--r-- | askbot/migrations/0127_save_category_tree_as_json.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/askbot/migrations/0127_save_category_tree_as_json.py b/askbot/migrations/0127_save_category_tree_as_json.py index b13cd2fe..34aba9c4 100644 --- a/askbot/migrations/0127_save_category_tree_as_json.py +++ b/askbot/migrations/0127_save_category_tree_as_json.py @@ -71,6 +71,12 @@ class Migration(DataMigration): """reads category tree saved as string, translates it to json and saves back""" old_data = askbot_settings.CATEGORY_TREE + + #this special value is our new default, + #we don't want to create a tag with this name + if old_data.replace(' ', '') == '[["dummy",[]]]': + old_data = '' + json_data = parse_tree(old_data) json_string = simplejson.dumps(json_data) askbot_settings.update('CATEGORY_TREE', json_string) |