From c46a34ec4e3a9e069fe32dc27d7c67a15e6fa4a2 Mon Sep 17 00:00:00 2001 From: tobes Date: Thu, 27 Sep 2012 10:07:29 +0100 Subject: [PATCH] [#2939] Add _replace_group_org controller helper --- ckan/controllers/group.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ckan/controllers/group.py b/ckan/controllers/group.py index 59486177199..7fef11d091f 100644 --- a/ckan/controllers/group.py +++ b/ckan/controllers/group.py @@ -1,3 +1,4 @@ +import re import logging import genshi import datetime @@ -58,6 +59,11 @@ def _edit_template(self, group_type): return lookup_group_plugin(group_type).edit_template() ## end hooks + def _replace_group_org(self, string): + ''' substitute organization for group if this is an org''' + if self.group_type == 'organization': + string = re.sub('^group', 'organization', string) + return string def _action(self, action_name): if self.group_type == 'organization':