From 3933a447af95a79f637c52de950dcc4efaa8a800 Mon Sep 17 00:00:00 2001
From: ebuzeyTra <buzeyemanuel@gmail.com>
Date: Fri, 18 Aug 2023 09:46:20 +0200
Subject: [PATCH] f-strings changed to str.format()

---
 energy_selfconsumption/models/distribution_table.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/energy_selfconsumption/models/distribution_table.py b/energy_selfconsumption/models/distribution_table.py
index dcd5af871..2d5e38ac6 100644
--- a/energy_selfconsumption/models/distribution_table.py
+++ b/energy_selfconsumption/models/distribution_table.py
@@ -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):
-- 
GitLab