Skip to content

Commit

Permalink
fix(createProjectService): pass null if additional_entities not upload
Browse files Browse the repository at this point in the history
  • Loading branch information
NSUWAL123 committed Nov 8, 2024
1 parent ce4e82a commit 1f99fc8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/frontend/src/api/CreateProjectService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,9 +206,10 @@ const GenerateProjectFilesService = (url: string, projectData: any, formUpload:
});
} else {
const generateApiFormData = new FormData();
if (additional_entities?.length > 0) {
generateApiFormData.append('additional_entities', additional_entities);
}
generateApiFormData.append(
'additional_entities',
additional_entities?.length > 0 ? additional_entities : null,
);
response = await axios.post(url, generateApiFormData, {
headers: {
'Content-Type': 'multipart/form-data',
Expand Down

0 comments on commit 1f99fc8

Please sign in to comment.