跳至內容
選單
此問題已被標幟
1 回覆
3184 瀏覽次數

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. 

頭像
捨棄
最佳答案

Hi, did you upgrade your module ?

Gus

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
1
11月 22
5459
2
11月 18
10116
1
3月 15
5976
4
3月 15
5173
1
3月 15
3543