Fix missing recursion constraint (issue1954)
This commit is contained in:
1 parent
e939a46ab4
commit
5baded9a0f
1 file changed
+7
@@ -16,6 +16,13 @@ class Category(ModelSQL, ModelView):
|
||||
def __init__(self):
|
||||
super(Category, self).__init__()
|
||||
self._order.insert(0, ('name', 'ASC'))
|
||||
|
||||
self._constraints += [
|
||||
('check_recursion', 'recursive_categories'),
|
||||
]
|
||||
self._error_messages.update({
|
||||
'recursive_categories': 'You can not create recursive categories!',
|
||||
})
|
||||
|
||||
def get_rec_name(self, ids, name):
|
||||
if not ids:
|
||||
|
||||
Reference in new issue
Block a user