@@ -334,7 +334,7 @@ class MeterArchivesLine(models.Model):
|
||||
for record in self:
|
||||
if record.last_read is not None and record.current_read is not None and record.last_read > 0:
|
||||
if record.current_read < record.last_read:
|
||||
if record.last_read - record.current_read >= 10000:
|
||||
if record.current_meter>= 10000:
|
||||
raise ValidationError(
|
||||
f"输入错误:当前读数 {record.current_read} 必须大于上次读数 {record.last_read} "
|
||||
)
|
||||
|
||||
@@ -268,7 +268,7 @@ class MeterWaterLine(models.Model):
|
||||
for record in self:
|
||||
if record.last_read is not None and record.current_read is not None and record.last_read > 0:
|
||||
if record.current_read < record.last_read:
|
||||
if record.last_read - record.current_read >= 10000:
|
||||
if record.current_meter>= 10000:
|
||||
raise ValidationError(
|
||||
f"输入错误:当前读数 {record.current_read} 必须大于上次读数 {record.last_read} "
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user