mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2024-11-22 08:46:39 -06:00
Fixed violates check constraint issue when creating a pgAgent schedule. #7390
This commit is contained in:
parent
673b5ea5a1
commit
9f6ddd3cf9
@ -37,4 +37,5 @@ Bug fixes
|
||||
| `Issue #7282 <https://github.com/pgadmin-org/pgadmin4/issues/7282>`_ - Fixed an XSS vulnerability in the /settings/store endpoint.
|
||||
| `Issue #7294 <https://github.com/pgadmin-org/pgadmin4/issues/7294>`_ - Fixed an issue where double dollar quoted code is treated as string in syntax highlighter.
|
||||
| `Issue #7317 <https://github.com/pgadmin-org/pgadmin4/issues/7317>`_ - Fixed an issue where pressing backspace should remove the spaces and not the entire tab width, on enabling 'Use spaces?' in the preferences.
|
||||
| `Issue #7384 <https://github.com/pgadmin-org/pgadmin4/issues/7384>`_ - Fixed an issue when closing the view data second tab; it raises the error that the 'ViewCommand' object has no attribute 'auto_commit'.
|
||||
| `Issue #7384 <https://github.com/pgadmin-org/pgadmin4/issues/7384>`_ - Fixed an issue when closing the view data second tab; it raises the error that the 'ViewCommand' object has no attribute 'auto_commit'.
|
||||
| `Issue #7390 <https://github.com/pgadmin-org/pgadmin4/issues/7390>`_ - Fixed violates check constraint issue when creating a pgAgent schedule.
|
@ -682,7 +682,7 @@ It may have been removed by another user.
|
||||
if k in ('comment',):
|
||||
data[k] = v
|
||||
else:
|
||||
data[k] = json.loads(v, encoding='utf-8')
|
||||
data[k] = json.loads(v)
|
||||
except (ValueError, TypeError, KeyError):
|
||||
data[k] = v
|
||||
|
||||
|
@ -13,6 +13,8 @@ import { isEmptyString } from 'sources/validators';
|
||||
import moment from 'moment';
|
||||
import { WEEKDAYS, MONTHDAYS, MONTHS, HOURS, MINUTES } from '../../../../../../static/js/constants';
|
||||
|
||||
const PGAGENT_MONTHDAYS = [...MONTHDAYS].concat([{label: gettext('Last day'), value: 'Last Day'}]);
|
||||
|
||||
export class ExceptionsSchema extends BaseUISchema {
|
||||
constructor(fieldOptions={}, initValues={}) {
|
||||
super({
|
||||
@ -126,7 +128,7 @@ export class DaysSchema extends BaseUISchema {
|
||||
placeholder: gettext('Select the month days...'),
|
||||
formatter: BooleanArrayFormatter,
|
||||
},
|
||||
options: MONTHDAYS,
|
||||
options: PGAGENT_MONTHDAYS,
|
||||
}, {
|
||||
id: 'jscmonths', label: gettext('Months'), type: 'select',
|
||||
group: gettext('Days'),
|
||||
@ -185,7 +187,7 @@ export default class PgaJobScheduleSchema extends BaseUISchema {
|
||||
jscstart: null,
|
||||
jscend: null,
|
||||
jscweekdays: _.map(WEEKDAYS, function() { return false; }),
|
||||
jscmonthdays: _.map(MONTHDAYS, function() { return false; }),
|
||||
jscmonthdays: _.map(PGAGENT_MONTHDAYS, function() { return false; }),
|
||||
jscmonths: _.map(MONTHS, function() { return false; }),
|
||||
jschours: _.map(HOURS, function() { return false; }),
|
||||
jscminutes: _.map(MINUTES, function() { return false; }),
|
||||
@ -274,7 +276,7 @@ export default class PgaJobScheduleSchema extends BaseUISchema {
|
||||
controlProps: {
|
||||
formatter: {
|
||||
fromRaw: (backendVal)=> {
|
||||
return obj.customFromRaw(backendVal, MONTHDAYS);
|
||||
return obj.customFromRaw(backendVal, PGAGENT_MONTHDAYS);
|
||||
}
|
||||
},
|
||||
}
|
||||
|
@ -524,7 +524,7 @@ SELECT EXISTS(
|
||||
sql = ''
|
||||
for k, v in request.args.items():
|
||||
try:
|
||||
data[k] = json.loads(v, 'utf-8')
|
||||
data[k] = json.loads(v)
|
||||
except ValueError:
|
||||
data[k] = v
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user