fix(project): duplicate a project without new parent

This commit is contained in:
kolaente 2023-07-07 12:42:26 +02:00
parent 2c4da79c1b
commit cd820a6cb2
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
2 changed files with 2 additions and 2 deletions

View File

@ -244,7 +244,7 @@ export function useProject(projectId: MaybeRef<IProject['id']>) {
async function duplicateProject(parentProjectId: IProject['id']) { async function duplicateProject(parentProjectId: IProject['id']) {
const projectDuplicate = new ProjectDuplicateModel({ const projectDuplicate = new ProjectDuplicateModel({
projectId: unref(projectId), projectId: Number(unref(projectId)),
parentProjectId, parentProjectId,
}) })

View File

@ -42,7 +42,7 @@ watch(
) )
async function duplicate() { async function duplicate() {
await duplicateProject(parentProject.value.id) await duplicateProject(parentProject.value?.id ?? 0)
success({message: t('project.duplicate.success')}) success({message: t('project.duplicate.success')})
} }
</script> </script>