Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odgovori
3073 Prikazi

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
Opusti
Best Answer

Hi, did you upgrade your module ?

Gus

Avatar
Opusti
Related Posts Odgovori Prikazi Aktivnost
1
nov. 22
5283
2
nov. 18
10015
1
mar. 15
5913
4
mar. 15
5070
1
mar. 15
3445