Fix an issue where scale in columns is not allowed to have value as 0 or below. #6851

This commit is contained in:
Aditya Toshniwal 2023-10-11 15:06:13 +05:30
parent e22492ad51
commit 221af6caa6
2 changed files with 3 additions and 1 deletions

View File

@ -44,3 +44,4 @@ Bug fixes
| `Issue #6790 <https://github.com/pgadmin-org/pgadmin4/issues/6790>`_ - Ensure that the backup works properly for PG 16 on the latest docker image. | `Issue #6790 <https://github.com/pgadmin-org/pgadmin4/issues/6790>`_ - Ensure that the backup works properly for PG 16 on the latest docker image.
| `Issue #6799 <https://github.com/pgadmin-org/pgadmin4/issues/6799>`_ - Fixed an issue where the user is unable to select objects on the backup dialog due to tree flickering. | `Issue #6799 <https://github.com/pgadmin-org/pgadmin4/issues/6799>`_ - Fixed an issue where the user is unable to select objects on the backup dialog due to tree flickering.
| `Issue #6836 <https://github.com/pgadmin-org/pgadmin4/issues/6836>`_ - Fixed an issue where non-super PostgreSQL users are not able to terminate their own connections from dashboard. | `Issue #6836 <https://github.com/pgadmin-org/pgadmin4/issues/6836>`_ - Fixed an issue where non-super PostgreSQL users are not able to terminate their own connections from dashboard.
| `Issue #6851 <https://github.com/pgadmin-org/pgadmin4/issues/6851>`_ - Fix an issue where scale in columns is not allowed to have value as 0 or below.

View File

@ -143,7 +143,8 @@ export default class ColumnSchema extends BaseUISchema {
attprecisionRange(state) { attprecisionRange(state) {
for(let o of this.datatypes) { for(let o of this.datatypes) {
if ( state.cltype == o.value ) { if ( state.cltype == o.value ) {
if(o.precision) return {min: o.min_val || 0, max: o.max_val}; // PostgreSQL allows negative precision
if(o.precision) return {min: -o.max_val, max: o.max_val};
} }
} }
return null; return null;