Skip to Content
Menú
This question has been flagged
1 Respondre
3080 Vistes

Hey guys, I was hoping someone could check over my implementation.

I have defined this model (and only included the relevant parts)


class EstateProperty(models.Model): 

  expected_price = fields.Float(required=True)

  _sql_constraints = [        ('check_expected_price', 'CHECK(expected_price > 0)',         'The expected price should be positive')    ]


Is this wrong? When I try to save negative numbers onto my form, my system is allowing it. 

Avatar
Descartar
Best Answer

Hi, did you upgrade your module ?

Gus

Avatar
Descartar
Related Posts Respostes Vistes Activitat
1
de nov. 22
5290
2
de nov. 18
10017
1
de març 15
5914
4
de març 15
5070
1
de març 15
3445