@@ -114,8 +114,8 @@ def check_external_config(self):
114
114
raise ValidationError (
115
115
_ (
116
116
"You can't use an external database as there are no such "
117
- "configuration about this. Please contact your Odoo administrator "
118
- " to solve this issue."
117
+ "configuration about this. Please contact "
118
+ "your Odoo administrator to solve this issue."
119
119
)
120
120
)
121
121
@@ -260,14 +260,14 @@ def _get_cr_for_query(self):
260
260
def _create_savepoint (self , cr ):
261
261
rollback_name = "{}_{}" .format (self ._name .replace ("." , "_" ), uuid .uuid1 ().hex )
262
262
# pylint: disable=sql-injection
263
- req = "SAVEPOINT %s" % ( rollback_name )
263
+ req = f "SAVEPOINT { rollback_name } "
264
264
cr .execute (req )
265
265
return rollback_name
266
266
267
267
@api .model
268
268
def _rollback_savepoint (self , rollback_name , cr ):
269
269
# pylint: disable=sql-injection
270
- req = "ROLLBACK TO SAVEPOINT %s" % ( rollback_name )
270
+ req = f "ROLLBACK TO SAVEPOINT { rollback_name } "
271
271
cr .execute (req )
272
272
# close external database cursor
273
273
if self .env .cr != cr :
@@ -300,7 +300,7 @@ def _check_prohibited_words(self):
300
300
self .ensure_one ()
301
301
query = self .query .lower ()
302
302
for word in self .PROHIBITED_WORDS :
303
- expr = r "\b%s \b" % word
303
+ expr = rf "\b{ word } \b"
304
304
is_not_safe = re .search (expr , query )
305
305
if is_not_safe :
306
306
raise UserError (
0 commit comments