From 61eed0c72d1d115755f805405afeec0d488b6cf4 Mon Sep 17 00:00:00 2001 From: Manuel Imperiale Date: Wed, 5 Dec 2018 19:57:23 +0100 Subject: [PATCH] Fix lora-adapter event store handlers (#492) Signed-off-by: Manuel Imperiale --- lora/redis/streams.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lora/redis/streams.go b/lora/redis/streams.go index a7f11829..0504d333 100644 --- a/lora/redis/streams.go +++ b/lora/redis/streams.go @@ -165,7 +165,7 @@ func (es eventStore) handleCreateThing(cte createThingEvent) error { if em.Type != protocol { return errMetadataType } - if em.DevEUI != "" { + if em.DevEUI == "" { return errMetadataDevEUI } @@ -181,7 +181,7 @@ func (es eventStore) handleUpdateThing(ute updateThingEvent) error { if em.Type != protocol { return errMetadataType } - if em.DevEUI != "" { + if em.DevEUI == "" { return errMetadataDevEUI } @@ -201,7 +201,7 @@ func (es eventStore) handleCreateChannel(cce createChannelEvent) error { if cm.Type != protocol { return errMetadataType } - if cm.AppID != "" { + if cm.AppID == "" { return errMetadataAppID } @@ -217,7 +217,7 @@ func (es eventStore) handleUpdateChannel(uce updateChannelEvent) error { if cm.Type != protocol { return errMetadataType } - if cm.AppID != "" { + if cm.AppID == "" { return errMetadataAppID }