Fixed an issue where export servers was not adding extension if not specified. #6781

pull/7086/head
Pravesh Sharma 2023-12-20 11:36:43 +05:30 committed by GitHub
parent a22b2a6074
commit 2d60bc2800
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -190,6 +190,9 @@ def save():
status = False
errmsg = None
if data['type'] == 'export':
file_ext = os.path.splitext(data['filename'])[-1].lower()
if file_ext != '.json':
data['filename'] = data['filename'] + '.json'
status, errmsg = \
dump_database_servers(data['filename'], data['selected_sever_ids'])
elif data['type'] == 'import':