From 09b3faa8da2bf80d78fcf2e32fe1bc005c3fbbc7 Mon Sep 17 00:00:00 2001 From: Sebastian Frank Date: Tue, 31 Aug 2021 19:41:24 +0200 Subject: [PATCH] fixed idToObjectID with null --- crud.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/crud.go b/crud.go index 1349b53..1848df4 100644 --- a/crud.go +++ b/crud.go @@ -78,6 +78,9 @@ func convertIDValue(v reflect.Value) reflect.Value { } func idToObjectID(filter interface{}) { + if filter == nil { + return + } //spew.Dump(filter) val := reflect.ValueOf(filter) switch reflect.TypeOf(filter).Kind() {