Skip to content
This repository has been archived by the owner on Apr 8, 2024. It is now read-only.

Commit

Permalink
fix(worker): panics when gdata item status is nil
Browse files Browse the repository at this point in the history
  • Loading branch information
rot1024 committed Feb 28, 2024
1 parent 43d3757 commit 9ac90fe
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions worker/preparegspatialjp/cms.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 9ac90fe

Please sign in to comment.