ImagesTable: Ensure created_at date for a new image
This adds a temporary value of current date to `created_at` for newly created images. This is not the most elegant solution and will be reworked after the ImagesTable refactor.
This commit is contained in:
parent
f1f544daec
commit
83206171f9
1 changed files with 5 additions and 0 deletions
|
|
@ -573,6 +573,10 @@ const CreateImageWizard = () => {
|
|||
|
||||
const appendTo = useMemo(() => document.querySelector(MODAL_ANCHOR), []);
|
||||
|
||||
// In case the `created_at` date is undefined when creating an image
|
||||
// a temporary value with current date is added
|
||||
const currentDate = new Date();
|
||||
|
||||
return (
|
||||
<ImageCreator
|
||||
onClose={handleClose}
|
||||
|
|
@ -587,6 +591,7 @@ const CreateImageWizard = () => {
|
|||
compose: {
|
||||
...response,
|
||||
request,
|
||||
created_at: currentDate.toISOString(),
|
||||
image_status: { status: 'pending' },
|
||||
},
|
||||
insert: true,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue