Skip to content

Commit 6770638

Browse files
committed
[19.0][MIG] fs_storage: Use lazy % or .format() or % formatting in odoo._ functions
1 parent a3d2729 commit 6770638

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

fs_storage/models/fs_storage.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -220,9 +220,10 @@ def _check_model_xmlid_storage_unique(self):
220220
raise ValidationError(
221221
self.env._(
222222
"Model %(model)s already stored in another "
223-
"FS storage ('%(other_storage)s')"
223+
"FS storage ('%(other_storage)s')",
224+
model=xmlid,
225+
other_storage=other_storages[0].name,
224226
)
225-
% {"model": xmlid, "other_storage": other_storages[0].name}
226227
)
227228

228229
@api.constrains("field_xmlids")
@@ -249,9 +250,10 @@ def _check_field_xmlid_storage_unique(self):
249250
raise ValidationError(
250251
self.env._(
251252
"Field %(field)s already stored in another "
252-
"FS storage ('%(other_storage)s')"
253+
"FS storage ('%(other_storage)s')",
254+
field=xmlid,
255+
other_storage=other_storages[0].name,
253256
)
254-
% {"field": xmlid, "other_storage": other_storages[0].name}
255257
)
256258

257259
@api.model

0 commit comments

Comments
 (0)