Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
1 Balas
3201 Tampilan

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
Buang
Jawaban Terbai

Hi, did you upgrade your module ?

Gus

Avatar
Buang
Post Terkait Replies Tampilan Aktivitas
1
Nov 22
5493
2
Nov 18
10125
1
Mar 15
5984
4
Mar 15
5181
1
Mar 15
3552