Skip to content
Permalink
Browse files

missing translations; add extension at save

  • Loading branch information
lbartoletti committed Nov 13, 2018
1 parent ebdc932 commit 03d53fb87137f213695ea95cd5e6b18d19e82790
Showing with 5 additions and 2 deletions.
  1. +5 −2 python/plugins/db_manager/dlg_sql_window.py
@@ -244,9 +244,12 @@ def saveAsFilePreset(self):
self,
self.tr('Save SQL Query'),
lastDir,
"SQL File (*.sql)")
self.tr("SQL File (*.sql, *.SQL)"))

if filename:
if not filename.lower().endswith('.sql'):
filename += ".sql"

with open(filename, 'w') as f:
f.write(query)
lastDir = os.path.dirname(filename)
@@ -260,7 +263,7 @@ def loadFilePreset(self):
self,
self.tr("Load SQL Query"),
lastDir,
"SQL File (*.sql)")
self.tr("SQL File (*.sql, *.SQL)"))

if filename:
with open(filename, 'r') as f:

0 comments on commit 03d53fb

Please sign in to comment.
You can’t perform that action at this time.