Skip to content

Commit e4d0136

Browse files
committed
fix: prevent overriding projects information
1 parent 3105465 commit e4d0136

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

frontend/src/modules/admin/modules/insights-projects/components/lf-insights-project-add.vue

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -215,11 +215,14 @@ const openModalEditMode = (insightsProjectId: string) => {
215215
216216
const onProjectSelection = ({ project }: any) => {
217217
fetchRepositories(project.id, () => {
218-
Object.assign(form, initialFormState);
218+
if (!isEditForm.value) {
219+
Object.assign(form, initialFormState);
220+
form.name = project.name;
221+
form.description = project.description;
222+
form.logoUrl = project.url;
223+
}
224+
219225
form.segmentId = project.id;
220-
form.name = project.name;
221-
form.description = project.description;
222-
form.logoUrl = project.url;
223226
});
224227
};
225228

0 commit comments

Comments
 (0)