Fix unique constraint on Model to use model field instead of name
This commit is contained in:
1 parent
a82e660dfd
commit
c1cf01ed09
1 file changed
+2
-2
+2
-2
@@ -20,8 +20,8 @@ class Model(OSV):
|
||||
def __init__(self):
|
||||
super(Model, self).__init__()
|
||||
self._sql_constraints += [
|
||||
('name_uniq', 'UNIQUE(name)',
|
||||
'The name of model must be unique!'),
|
||||
('model_uniq', 'UNIQUE(model)',
|
||||
'The model must be unique!'),
|
||||
]
|
||||
|
||||
Model()
|
||||
|
||||
Reference in new issue
Block a user