bteodoru commited on
Commit
8d081b4
·
verified ·
1 Parent(s): c426322

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -8
app.py CHANGED
@@ -67,14 +67,15 @@ class SoilInput(BaseModel):
67
  raise ValueError("Perioada de maturare trebuie să fie între 1 și 90 zile dacă cement_perecent > 0")
68
  return self
69
 
70
- @model_validator(mode="after")
71
- def check_cement_and_curing(self):
72
- if self.cement_percent == 0:
73
- self.curing_period = 0
74
- else:
75
- if not (1 <= self.curing_period <= 90):
76
- raise ValueError("Invalid curing period")
77
- return self
 
78
  @validator('cement_perecent')
79
  def validate_cement(cls, v):
80
  if not 0 <= v <= 15:
 
67
  raise ValueError("Perioada de maturare trebuie să fie între 1 și 90 zile dacă cement_perecent > 0")
68
  return self
69
 
70
+ # @model_validator(mode="after")
71
+ # def check_cement_and_curing(self):
72
+ # if self.cement_percent == 0:
73
+ # self.curing_period = 0
74
+ # else:
75
+ # if not (1 <= self.curing_period <= 90):
76
+ # raise ValueError("Invalid curing period")
77
+ # return self
78
+
79
  @validator('cement_perecent')
80
  def validate_cement(cls, v):
81
  if not 0 <= v <= 15: