Mercurial > hgweb > health
changeset 1522:42d65ad19c3f stable
health: fix bug #43089 Missing unique constraint on health professionals
| author | Luis Falcon <falcon@gnu.org> |
|---|---|
| date | Wed, 27 Aug 2014 20:15:29 +0100 |
| parents | 32718ce4eee6 |
| children | b9c64f64e267 |
| files | tryton/health/health.py |
| diffstat | 1 files changed, 8 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/tryton/health/health.py +++ b/tryton/health/health.py @@ -1196,6 +1196,14 @@ return res @classmethod + def __setup__(cls): + super(HealthProfessional, cls).__setup__() + cls._sql_constraints = [ + ('name_uniq', 'UNIQUE(name)', + 'The Health Professional already exists'), + ] + + @classmethod def __register__(cls, module_name): cursor = Transaction().cursor
