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 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 # handle the Array list sent from the client
array_string = '' array_string = ''
if data[i]['value'].__class__.__name__ in ( if 'value' in data[i]:
'list') and data[i]['value']: if data[i]['value'].__class__.__name__ in (
for k in range(0, len(data[i]['value'])): 'list') and data[i]['value']:
array_string += data[i]['value'][k]['value'] for k in range(0, len(data[i]['value'])):
if k != (len(data[i]['value']) - 1): array_string += data[i]['value'][k]['value']
array_string += ',' if k != (len(data[i]['value']) - 1):
elif data[i]['value'].__class__.__name__ in ( array_string += ','
'list') and not data[i]['value']: elif data[i]['value'].__class__.__name__ in (
array_string = '' 'list') and not data[i]['value']:
else: array_string = ''
array_string = data[i]['value'] else:
array_string = data[i]['value']
# Check if data is already available in database then update the # Check if data is already available in database then update the
# existing value otherwise add the new value # existing value otherwise add the new value

View File

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