Prevent an error that may occur when editing data with an integer primary key. Fixes #4404

This commit is contained in:
Aditya Toshniwal 2019-06-27 10:43:25 -04:00 committed by Dave Page
parent 2451db8797
commit da8cf14047
2 changed files with 4 additions and 2 deletions

View File

@ -14,4 +14,5 @@ New features
Bug fixes
*********
| `Bug #4403 <https://redmine.postgresql.org/issues/4403>`_ - Ensure the browser close confirmation is only shown when closing a Query Tool which is running in a separate browser tab.
| `Bug #4403 <https://redmine.postgresql.org/issues/4403>`_ - Ensure the browser close confirmation is only shown when closing a Query Tool which is running in a separate browser tab.
| `Bug #4404 <https://redmine.postgresql.org/issues/4404>`_ - Prevent an error that may occur when editing data with an integer primary key.

View File

@ -781,7 +781,8 @@ class TableCommand(GridCommand):
for each_row in changed_data[of_type]:
data = changed_data[of_type][each_row]['data']
pk_escaped = {
pk: pk_val.replace('%', '%%')
pk: pk_val.replace('%', '%%') if hasattr(
pk_val, 'replace') else pk_val
for pk, pk_val in
changed_data[of_type][each_row]['primary_keys']
.items()