Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
3211 Visualizzazioni

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
Abbandona
Risposta migliore

Hi, did you upgrade your module ?

Gus

Avatar
Abbandona
Post correlati Risposte Visualizzazioni Attività
1
nov 22
5516
2
nov 18
10133
1
mar 15
5988
4
mar 15
5184
1
mar 15
3562