コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
3397 ビュー

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
5834
2
11月 18
10311
1
3月 15
6120
4
3月 15
5368
1
3月 15
3677