From a5d39003b6d9e5e43a282f9bc4a7263fa7336455 Mon Sep 17 00:00:00 2001 From: Akshay Joshi Date: Mon, 25 Feb 2019 10:24:11 +0000 Subject: [PATCH] Handle display of roles with expiration set to infinity correctly. Fixes #3352 --- docs/en_US/release_notes_4_3.rst | 1 + web/pgadmin/static/js/backform.pgadmin.js | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/docs/en_US/release_notes_4_3.rst b/docs/en_US/release_notes_4_3.rst index 0aab796aa..f734bbcc2 100644 --- a/docs/en_US/release_notes_4_3.rst +++ b/docs/en_US/release_notes_4_3.rst @@ -21,6 +21,7 @@ Bug fixes ********* | `Bug #3096 `_ - Ensure size stats are prettified on the statistics tab when the UI language is not English. +| `Bug #3352 `_ - Handle display of roles with expiration set to infinity correctly. | `Bug #3418 `_ - Allow editing of values in columns with the oid datatype which are not an actual row OID. | `Bug #3544 `_ - Make the Query Tool tab titles more concise and useful. | `Bug #3583 `_ - Update CodeMirror to 5.43.0 to resolve issues with auto-indent. diff --git a/web/pgadmin/static/js/backform.pgadmin.js b/web/pgadmin/static/js/backform.pgadmin.js index c18c27bf2..13d9f360d 100644 --- a/web/pgadmin/static/js/backform.pgadmin.js +++ b/web/pgadmin/static/js/backform.pgadmin.js @@ -2598,6 +2598,11 @@ define([ } else { this.has_datepicker = true; var self = this; + if (!_.isUndefined(data.value) && !_.isNull(data.value) + && data.value.toLowerCase() === 'infinity') { + data.value = null; + } + this.$el.find('input').first().datetimepicker( _.extend({ keyBinds: {