Allow use of 0 (integer) and empty strings as parameters in the debugger. Fixes #3629

This commit is contained in:
Akshay Joshi 2018-11-02 16:44:09 +00:00 committed by Dave Page
parent 628f0d254e
commit 220fdf583e
3 changed files with 15 additions and 14 deletions

View File

@ -15,4 +15,5 @@ Features
Bug fixes
*********
| `Bug #3029 <https://redmine.postgresql.org/issues/3029>`_ - Allow the selection order to be preserved in the Select2 control to fix column ordering in data Import/Export.
| `Bug #3029 <https://redmine.postgresql.org/issues/3029>`_ - Allow the selection order to be preserved in the Select2 control to fix column ordering in data Import/Export.
| `Bug #3629 <https://redmine.postgresql.org/issues/3629>`_ - Allow use of 0 (integer) and empty strings as parameters in the debugger.

View File

@ -1806,17 +1806,18 @@ def set_arguments_sqlite(sid, did, scid, func_id):
# handle the Array list sent from the client
array_string = ''
if data[i]['value'].__class__.__name__ in (
'list') and data[i]['value']:
for k in range(0, len(data[i]['value'])):
array_string += data[i]['value'][k]['value']
if k != (len(data[i]['value']) - 1):
array_string += ','
elif data[i]['value'].__class__.__name__ in (
'list') and not data[i]['value']:
array_string = ''
else:
array_string = data[i]['value']
if 'value' in data[i]:
if data[i]['value'].__class__.__name__ in (
'list') and data[i]['value']:
for k in range(0, len(data[i]['value'])):
array_string += data[i]['value'][k]['value']
if k != (len(data[i]['value']) - 1):
array_string += ','
elif data[i]['value'].__class__.__name__ in (
'list') and not data[i]['value']:
array_string = ''
else:
array_string = data[i]['value']
# Check if data is already available in database then update the
# existing value otherwise add the new value

View File

@ -901,8 +901,7 @@ define([
}
// TODO: Need to check the "Expression" column value to
// enable/disable the "Debug" button
if (this.collection.models[i].get('value') == '' ||
this.collection.models[i].get('value') == null ||
if (this.collection.models[i].get('value') == null ||
this.collection.models[i].get('value') == undefined) {
enable_btn = true;