mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2024-11-30 12:33:52 -06:00
Unset compression ratio if it is an empty string in Backup module. Fixes #2582
This commit is contained in:
parent
bff48e0b2d
commit
c7686dee05
@ -360,6 +360,10 @@ def create_backup_objects_job(sid):
|
||||
else:
|
||||
data = json.loads(request.data, encoding='utf-8')
|
||||
|
||||
# Remove ratio from data in case of empty string
|
||||
if 'ratio' in data and data['ratio'] == '':
|
||||
data.pop("ratio")
|
||||
|
||||
try:
|
||||
backup_file = filename_with_file_manager_path(data['file'])
|
||||
except Exception as e:
|
||||
|
@ -773,6 +773,12 @@ TODO LIST FOR BACKUP:
|
||||
);
|
||||
}
|
||||
|
||||
// Remove ratio attribute from model if it has empty string.
|
||||
// The valid value can be between 0 to 9.
|
||||
if (_.isEmpty(this.view.model.get('ratio'))) {
|
||||
this.view.model.unset('ratio');
|
||||
}
|
||||
|
||||
var self = this,
|
||||
baseUrl = url_for('backup.create_object_job', {'sid': treeInfo.server._id}),
|
||||
args = this.view.model.toJSON();
|
||||
|
Loading…
Reference in New Issue
Block a user