Skip to content

Commit f8a1268

Browse files
ramalholeorochael
andauthored
dblib.update_record: Get connection only if identifiers are ok
Co-authored-by: Leonardo Rochael Almeida <leorochael@gmail.com>
1 parent 37d3e2b commit f8a1268

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

25-class-metaprog/persistent/dblib.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,8 @@ def fetch_record(table_name, pk):
133133

134134

135135
def update_record(table_name, pk, fields):
136-
con = get_connection()
137136
check_identifier(table_name)
137+
con = get_connection()
138138
names = ', '.join(fields.keys())
139139
placeholders = ', '.join(['?'] * len(fields))
140140
values = tuple(fields.values()) + (pk,)

0 commit comments

Comments
 (0)