mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Fixed violates check constraint issue when creating a pgAgent schedule. #7390
This commit is contained in:
parent
673b5ea5a1
commit
9f6ddd3cf9
@ -38,3 +38,4 @@ Bug fixes
|
|||||||
| `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 #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 #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',):
|
if k in ('comment',):
|
||||||
data[k] = v
|
data[k] = v
|
||||||
else:
|
else:
|
||||||
data[k] = json.loads(v, encoding='utf-8')
|
data[k] = json.loads(v)
|
||||||
except (ValueError, TypeError, KeyError):
|
except (ValueError, TypeError, KeyError):
|
||||||
data[k] = v
|
data[k] = v
|
||||||
|
|
||||||
|
@ -13,6 +13,8 @@ import { isEmptyString } from 'sources/validators';
|
|||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import { WEEKDAYS, MONTHDAYS, MONTHS, HOURS, MINUTES } from '../../../../../../static/js/constants';
|
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 {
|
export class ExceptionsSchema extends BaseUISchema {
|
||||||
constructor(fieldOptions={}, initValues={}) {
|
constructor(fieldOptions={}, initValues={}) {
|
||||||
super({
|
super({
|
||||||
@ -126,7 +128,7 @@ export class DaysSchema extends BaseUISchema {
|
|||||||
placeholder: gettext('Select the month days...'),
|
placeholder: gettext('Select the month days...'),
|
||||||
formatter: BooleanArrayFormatter,
|
formatter: BooleanArrayFormatter,
|
||||||
},
|
},
|
||||||
options: MONTHDAYS,
|
options: PGAGENT_MONTHDAYS,
|
||||||
}, {
|
}, {
|
||||||
id: 'jscmonths', label: gettext('Months'), type: 'select',
|
id: 'jscmonths', label: gettext('Months'), type: 'select',
|
||||||
group: gettext('Days'),
|
group: gettext('Days'),
|
||||||
@ -185,7 +187,7 @@ export default class PgaJobScheduleSchema extends BaseUISchema {
|
|||||||
jscstart: null,
|
jscstart: null,
|
||||||
jscend: null,
|
jscend: null,
|
||||||
jscweekdays: _.map(WEEKDAYS, function() { return false; }),
|
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; }),
|
jscmonths: _.map(MONTHS, function() { return false; }),
|
||||||
jschours: _.map(HOURS, function() { return false; }),
|
jschours: _.map(HOURS, function() { return false; }),
|
||||||
jscminutes: _.map(MINUTES, function() { return false; }),
|
jscminutes: _.map(MINUTES, function() { return false; }),
|
||||||
@ -274,7 +276,7 @@ export default class PgaJobScheduleSchema extends BaseUISchema {
|
|||||||
controlProps: {
|
controlProps: {
|
||||||
formatter: {
|
formatter: {
|
||||||
fromRaw: (backendVal)=> {
|
fromRaw: (backendVal)=> {
|
||||||
return obj.customFromRaw(backendVal, MONTHDAYS);
|
return obj.customFromRaw(backendVal, PGAGENT_MONTHDAYS);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@ -524,7 +524,7 @@ SELECT EXISTS(
|
|||||||
sql = ''
|
sql = ''
|
||||||
for k, v in request.args.items():
|
for k, v in request.args.items():
|
||||||
try:
|
try:
|
||||||
data[k] = json.loads(v, 'utf-8')
|
data[k] = json.loads(v)
|
||||||
except ValueError:
|
except ValueError:
|
||||||
data[k] = v
|
data[k] = v
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user