--- a/Allura/allura/model/neighborhood.py
+++ b/Allura/allura/model/neighborhood.py
@@ -1,6 +1,7 @@
import re
import json
import logging
+from collections import OrderedDict
from ming import schema as S
from ming.orm import FieldProperty, RelationProperty, ForeignIdProperty
@@ -66,7 +67,7 @@
max_projects=S.Int,
css=str,
google_analytics=bool))
- default_tools = FieldProperty(str, if_missing='summary:Summary, files:Files, reviews:Reviews, support:Support')
+ anchored_tools = FieldProperty(str, if_missing='')
def parent_security_context(self):
return None
@@ -238,15 +239,9 @@
def migrate_css_for_picker(self):
self.css = ""
- def get_default_tools(self):
- default_tools = self.default_tools.replace(' ', '').split(',')
+ def get_anchored_tools(self):
+ anchored_tools = self.anchored_tools.replace(' ', '').split(',')
try:
- return dict((tool.split(':')[0].lower(), tool.split(':')[1]) for tool in default_tools)
+ return OrderedDict((tool.split(':')[0].lower(), tool.split(':')[1]) for tool in anchored_tools)
except Exception:
return dict()
-
- def get_default_tools_order(self):
- if not len(self.default_tools.strip()):
- return []
- default_tools = self.default_tools.replace(' ', '').split(',')
- return [tool.split(':')[0].lower() for tool in default_tools]