From 1cd0c9abe63a315f59456fff44a53dfb4795afa3 Mon Sep 17 00:00:00 2001 From: Jo Asplin Date: Wed, 25 Oct 2023 13:30:40 +0200 Subject: [PATCH] Fixed bug --- datastore/storagebackend/postgresql/putobservations.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/datastore/storagebackend/postgresql/putobservations.go b/datastore/storagebackend/postgresql/putobservations.go index b986dfd..da9bd21 100644 --- a/datastore/storagebackend/postgresql/putobservations.go +++ b/datastore/storagebackend/postgresql/putobservations.go @@ -377,7 +377,7 @@ func (sbe *PostgreSQL) PutObservations(request *datastore.PutObsRequest) error { return fmt.Errorf("obs time too old: %v < %v", obsTime.AsTime(), loTime) } - if obsTime.AsTime().Before(loTime) { + if obsTime.AsTime().After(hiTime) { return fmt.Errorf("obs time too new: %v > %v", obsTime.AsTime(), hiTime) }