Partial revert
Last commit contained some changes that did not belong there, revert
them for now.
Patch by: Sverre Rabbelier
--- a/app/soc/logic/models/base.py Sat Dec 06 11:26:15 2008 +0000
+++ b/app/soc/logic/models/base.py Sat Dec 06 11:31:08 2008 +0000
@@ -77,15 +77,6 @@
return self._scope_logic
- def getScopeDepth(self):
- """
- """
-
- if self._scope_logic:
- return 1 + self._scope_logic.logic.getScopeDepth()
-
- return 0
-
def _updateField(self, model, name, value):
"""Hook called when a field is updated.
--- a/app/soc/views/helper/params.py Sat Dec 06 11:26:15 2008 +0000
+++ b/app/soc/views/helper/params.py Sat Dec 06 11:31:08 2008 +0000
@@ -241,16 +241,11 @@
first part of the returned pattern.
"""
- logic = params['logic']
- names = logic.getKeyFieldNames()
+ names = params['logic'].getKeyFieldNames()
patterns = params['key_fields_prefix']
for name in names:
- regexp = linkable.LINK_ID_PATTERN_CORE
- if name == 'scope_path':
- regexp = '/'.join((regexp for i in range(logic.getScopeDepth())))
-
- pattern = r'(?P<%s>%s)' % (name, regexp)
+ pattern = r'(?P<%s>%s)' % (name, linkable.LINK_ID_PATTERN_CORE)
patterns.append(pattern)
result = '/'.join(patterns)