Skip to content

Commit

Permalink
Merge pull request #51 from gisce/fix_delete_record_function
Browse files Browse the repository at this point in the history
Fix delete record function
  • Loading branch information
polsala authored Aug 8, 2024
2 parents 7b870d2 + c816698 commit 36f4a9b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion oopgrade/oopgrade.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,9 @@ def delete_record(cursor, module_name, record_names):
'sc_view_id': model_data_vs['res_id']
}
cursor.execute(sql_sc_search, params_sc_id)
view_id_to_delete = cursor.dictfetchall()[0]
view_id_to_delete = cursor.dictfetchall()
if view_id_to_delete:
view_id_to_delete = view_id_to_delete[0]
sql_sc_del = """
DELETE FROM ir_ui_view_sc WHERE id = %(sc_view_id)s
"""
Expand Down

0 comments on commit 36f4a9b

Please sign in to comment.