comparison rhodecode/model/forms.py @ 1363:923d2f699bd7 beta

fixed issue with adding new group. template typo fix for empty group
author Marcin Kuzminski <marcin@python-works.com>
date Sun, 05 Jun 2011 02:09:27 +0200
parents 87ca17540603
children b6cac385cef0
comparison
equal deleted inserted replaced
1362:4c9bd42f82f9 1363:923d2f699bd7
125 group_parent_id = int(value.get('group_parent_id') or - 1) 125 group_parent_id = int(value.get('group_parent_id') or - 1)
126 126
127 # slugify repo group just in case :) 127 # slugify repo group just in case :)
128 slug = repo_name_slug(group_name) 128 slug = repo_name_slug(group_name)
129 129
130 print old_data
130 # check for parent of self 131 # check for parent of self
131 if old_data['group_id'] == group_parent_id: 132 if edit and old_data['group_id'] == group_parent_id:
132 e_dict = {'group_parent_id':_('Cannot assign this group ' 133 e_dict = {'group_parent_id':_('Cannot assign this group '
133 'as parent')} 134 'as parent')}
134 raise formencode.Invalid('', value, state, 135 raise formencode.Invalid('', value, state,
135 error_dict=e_dict) 136 error_dict=e_dict)
136 137