Skip to content
Snippets Groups Projects
Commit 3933a447 authored by ebuzeyTra's avatar ebuzeyTra
Browse files

f-strings changed to str.format()

parent 5956fd9d
No related branches found
No related tags found
2 merge requests!195[REL] 14.0.2.0.0,!185constrain added and unlink method extended
Pipeline #42714 passed
......@@ -47,7 +47,7 @@ class DistributionTable(models.Model):
def _supply_point_constrain(self):
for record in self:
if record.state in ('validated', 'process', 'active'):
raise ValidationError(_(f"The supply point can't be removed because the distribution table state is {record.state}"))
raise ValidationError(_("The supply point can't be removed because the distribution table state is {table_state}").format(table_state=record.state))
@api.onchange('selfconsumption_project_id')
def _onchange_selfconsumption_project_id(self):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment