Fixed error on displaying table properties of a table partitioned by list having a default partition. Fixes #4262

This commit is contained in:
Sander Eikelenboom 2019-05-15 18:36:16 +05:30 committed by Akshay Joshi
parent db4bb22cc6
commit ab5f35da8d
2 changed files with 12 additions and 5 deletions

View File

@ -22,4 +22,5 @@ Bug fixes
| `Bug #4244 <https://redmine.postgresql.org/issues/4244>`_ - Fix Tab key issue for Toggle switch controls and button on the dialog footer in Safari browser.
| `Bug #4245 <https://redmine.postgresql.org/issues/4245>`_ - Ensure that element should get highlighted when they get focus on using Tab key.
| `Bug #4246 <https://redmine.postgresql.org/issues/4246>`_ - Fixed console error when subnode control is used in panels.
| `Bug #4261 <https://redmine.postgresql.org/issues/4261>`_ - Stop using application/x-javascript as a mime type and use the RFC-compliant application/javascript instead.
| `Bug #4261 <https://redmine.postgresql.org/issues/4261>`_ - Stop using application/x-javascript as a mime type and use the RFC-compliant application/javascript instead.
| `Bug #4262 <https://redmine.postgresql.org/issues/4262>`_ - Fixed error on displaying table properties of a table partitioned by list having a default partition.

View File

@ -2203,14 +2203,20 @@ class BaseTableView(PGChildNodeView, BasePartitionTable):
'is_default': is_default
})
elif data['partition_type'] == 'list':
range_part = \
row['partition_value'].split('FOR VALUES IN (')[1]
if row['partition_value'] == 'DEFAULT':
is_default = True
range_in = None
else:
range_part = row['partition_value'].split(
'FOR VALUES IN (')[1]
range_in = range_part[:-1]
is_default = False
range_in = range_part[:-1]
partitions.append({
'oid': row['oid'],
'partition_name': partition_name,
'values_in': range_in
'values_in': range_in,
'is_default': is_default
})
else:
range_part = row['partition_value'].split(