diff --git a/backend/projects/serializers.py b/backend/projects/serializers.py index 36b05072..99f5fc2c 100644 --- a/backend/projects/serializers.py +++ b/backend/projects/serializers.py @@ -83,6 +83,11 @@ class ProjectSerializer(serializers.ModelSerializer): tags.save(project=project) return project + def update(self, instance, validated_data): + # Don't update tags. Please use TagAPI. + validated_data.pop("tags", None) + return super().update(instance, validated_data) + class TextClassificationProjectSerializer(ProjectSerializer): class Meta(ProjectSerializer.Meta): diff --git a/frontend/services/application/project/projectApplicationService.ts b/frontend/services/application/project/projectApplicationService.ts index ae50b497..132d51ca 100644 --- a/frontend/services/application/project/projectApplicationService.ts +++ b/frontend/services/application/project/projectApplicationService.ts @@ -35,6 +35,7 @@ export class ProjectApplicationService { public async update(item: ProjectWriteDTO): Promise { try { const project = this.toWriteModel(item) + project.tags = [] await this.repository.update(project) } catch(e: any) { throw new Error(e.response.data.detail)