From be68c6fecba029189d37b7e08b30811c4f55f4cd Mon Sep 17 00:00:00 2001 From: Frank Elsinga Date: Tue, 12 Mar 2024 22:03:43 +0100 Subject: [PATCH] made sure that feedback lat/lon are not saved as zero (instead as null) --- server/backend/feedback.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/backend/feedback.go b/server/backend/feedback.go index b21e639f..75cfc457 100644 --- a/server/backend/feedback.go +++ b/server/backend/feedback.go @@ -142,7 +142,7 @@ func mergeFeedback(feedback *model.Feedback, req *pb.CreateFeedbackRequest) { if req.AppVersion != "" { feedback.AppVersion = null.StringFrom(req.AppVersion) } - if req.Location != nil { + if req.Location != nil && req.Location.Longitude != 0 && req.Location.Latitude != 0 { feedback.Longitude = null.FloatFrom(req.Location.Longitude) feedback.Latitude = null.FloatFrom(req.Location.Latitude) }