From ae3dd3f5917271b3c320cd9974708f16d4417d42 Mon Sep 17 00:00:00 2001 From: "S. Grimault" Date: Sun, 19 May 2024 15:22:44 +0200 Subject: [PATCH] fix(#41): id_taxa_list may contains negative values (e.g. -1 which has a semantic meaning)... --- .../java/fr/geonature/datasync/sync/io/DatasetJsonReader.kt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/datasync/src/main/java/fr/geonature/datasync/sync/io/DatasetJsonReader.kt b/datasync/src/main/java/fr/geonature/datasync/sync/io/DatasetJsonReader.kt index f471d60..687d7ba 100644 --- a/datasync/src/main/java/fr/geonature/datasync/sync/io/DatasetJsonReader.kt +++ b/datasync/src/main/java/fr/geonature/datasync/sync/io/DatasetJsonReader.kt @@ -121,9 +121,7 @@ class DatasetJsonReader { "active" -> active = reader.nextBoolean() "meta_create_date" -> createdAt = toDate(reader.nextString()) "meta_update_date" -> updatedAt = toDate(reader.nextStringOrNull()) - "id_taxa_list" -> taxaListId = reader - .nextLongOrNull() - ?.coerceAtLeast(0L) + "id_taxa_list" -> taxaListId = reader.nextLongOrNull() else -> reader.skipValue() }