From 451e0041f6c431c57938db34c507dbb48563e2bd Mon Sep 17 00:00:00 2001
From: Hugo SUBTIL <ext.sopra.husubtil@grandlyon.com>
Date: Wed, 10 Feb 2021 18:51:11 +0100
Subject: [PATCH] fix: delete structure

---
 src/structures/services/structures.service.ts | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/structures/services/structures.service.ts b/src/structures/services/structures.service.ts
index f574d12fd..810442b27 100644
--- a/src/structures/services/structures.service.ts
+++ b/src/structures/services/structures.service.ts
@@ -226,6 +226,7 @@ export class StructuresService {
     if (!structure) {
       throw new HttpException('Invalid structure id', HttpStatus.BAD_REQUEST);
     }
+    structure.structureType = null;
     structure.deletedAt = DateTime.local().setZone('Europe/Paris').toString();
     this.anonymizeStructure(structure).save();
     return structure;
-- 
GitLab