From a8b39154454324dec602820b3609b93479463682 Mon Sep 17 00:00:00 2001 From: Adrian-Stefan Mares Date: Wed, 26 Jul 2023 13:45:54 +0200 Subject: [PATCH] as: Support gateways without location --- .../io/packages/loragls/v3/api/objects.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pkg/applicationserver/io/packages/loragls/v3/api/objects.go b/pkg/applicationserver/io/packages/loragls/v3/api/objects.go index 23aacd5bca..f074a3a6ad 100644 --- a/pkg/applicationserver/io/packages/loragls/v3/api/objects.go +++ b/pkg/applicationserver/io/packages/loragls/v3/api/objects.go @@ -189,9 +189,11 @@ func (r *RxMetadata) FromProto(pb *ttnpb.RxMetadata) error { return err } - r.Location = &RxMDLocation{} - if err := r.Location.FromProto(pb.Location); err != nil { - return err + if pb.Location != nil { + r.Location = &RxMDLocation{} + if err := r.Location.FromProto(pb.Location); err != nil { + return err + } } r.AntennaIndex = pb.AntennaIndex