[IMP] runbot_merge: repos shoud be unique

Having the same repository in two different projects makes no sense,
the two projects will conflict with one another.
This commit is contained in:
Xavier Morel 2018-03-26 11:04:43 +02:00 committed by xmo-odoo
parent e52d08ecdf
commit 933559da04

View File

@ -271,7 +271,7 @@ class Repository(models.Model):
def _auto_init(self):
res = super(Repository, self)._auto_init()
tools.create_unique_index(
self._cr, 'runbot_merge_unique_repo', self._table, ['name', 'project_id'])
self._cr, 'runbot_merge_unique_repo', self._table, ['name'])
return res
class Branch(models.Model):