Skip to content

Commit cf7df6b

Browse files
committed
fix update sql
1 parent d990e1f commit cf7df6b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

mirage/tools.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,9 @@ def executor(self, apps=None, schema_editor=None, offset=0, total=None, limit=10
7272
execute_sql = ''
7373
for value in value_list:
7474
if method in ['encrypt', 'decrypt']:
75-
execute_sql += f"update {db_table} set {self.field}='{value[1]}' where id={value[0]};"
75+
execute_sql += f"update {db_table} set {self.field}='{value[1]}' where id='{value[0]}';"
7676
elif method in ['copy_to', 'encrypt_to', 'decrypt_to']:
77-
execute_sql += f"update {db_table} set {self.tofield}='{value[1]}' where id={value[0]};"
77+
execute_sql += f"update {db_table} set {self.tofield}='{value[1]}' where id='{value[0]}';"
7878
cursor.execute(execute_sql)
7979
if value_list:
8080
t.update(value_list[-1][0] - offset)

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
88
setup(
99
name='django-mirage-field',
10-
version='1.1.3',
10+
version='1.1.4',
1111
install_requires=[
1212
"cryptography",
1313
"tqdm",

0 commit comments

Comments
 (0)