Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
1 Răspunde
2518 Vizualizări

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. 

Imagine profil
Abandonează
Cel mai bun răspuns

Hi, did you upgrade your module ?

Gus

Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
1
nov. 22
4308
2
nov. 18
9501
1
mar. 15
5468
4
mar. 15
4665
1
mar. 15
3061