Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
3079 Widoki

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. 

Awatar
Odrzuć
Najlepsza odpowiedź

Hi, did you upgrade your module ?

Gus

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
1
lis 22
5290
2
lis 18
10017
1
mar 15
5914
4
mar 15
5070
1
mar 15
3445