Parcourir la source

fix normalizeEntity method on null value

Olivier Massot il y a 1 an
Parent
commit
a2b5eb041a
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      services/data/normalizer/hydraNormalizer.ts

+ 1 - 1
services/data/normalizer/hydraNormalizer.ts

@@ -27,7 +27,7 @@ class HydraNormalizer {
           return UrlUtils.makeIRI(targetEntity, id)
         })
       } else {
-        entity[field] = UrlUtils.makeIRI(targetEntity, value)
+        entity[field] = value !== null ? UrlUtils.makeIRI(targetEntity, value) : null
       }
     }