Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
3082 Lượt xem

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. 

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Hi, did you upgrade your module ?

Gus

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 11 22
5292
2
thg 11 18
10019
1
thg 3 15
5915
4
thg 3 15
5070
1
thg 3 15
3445