From 9ac90fe2baa15364210082807399dc48694b8e9d Mon Sep 17 00:00:00 2001 From: rot1024 Date: Wed, 28 Feb 2024 17:37:59 +0900 Subject: [PATCH] fix(worker): panics when gdata item status is nil --- worker/preparegspatialjp/cms.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/worker/preparegspatialjp/cms.go b/worker/preparegspatialjp/cms.go index 8faabf06a..a484c783d 100644 --- a/worker/preparegspatialjp/cms.go +++ b/worker/preparegspatialjp/cms.go @@ -103,19 +103,19 @@ type GspatialjpDataItem struct { const running = "実行中" func (g *GspatialjpDataItem) ShouldMergeCityGML() bool { - return g.MergeCityGMLStatus.Name != running + return g.MergeCityGMLStatus == nil || g.MergeCityGMLStatus.Name != running } func (g *GspatialjpDataItem) ShouldMergePlateau() bool { - return g.MergePlateauStatus.Name != running + return g.MergeCityGMLStatus == nil || g.MergePlateauStatus.Name != running } func (g *GspatialjpDataItem) ShouldMergeRelated() bool { - return g.MergeRelatedStatus.Name != running + return g.MergeCityGMLStatus == nil || g.MergeRelatedStatus.Name != running } func (g *GspatialjpDataItem) ShouldMergeMaxLOD() bool { - return g.MergeMaxLODStatus.Name != running + return g.MergeCityGMLStatus == nil || g.MergeMaxLODStatus.Name != running } func GspatialjpDataItemFrom(item *cms.Item) (i *GspatialjpDataItem) {