Navigation Menu

Skip to content

Commit

Permalink
missing translations; add extension at save
Browse files Browse the repository at this point in the history
  • Loading branch information
lbartoletti committed Nov 13, 2018
1 parent ebdc932 commit 03d53fb
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions python/plugins/db_manager/dlg_sql_window.py
Expand Up @@ -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)
Expand All @@ -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:
Expand Down

0 comments on commit 03d53fb

Please sign in to comment.