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

Commit

Permalink
fix(server): support city public metadata field to datacatalogv3
Browse files Browse the repository at this point in the history
  • Loading branch information
rot1024 committed Mar 15, 2024
1 parent 5427a5d commit 371b776
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion server/datacatalog/datacatalogv3/cms_model.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ type CityItem struct {
// meatadata
PlateauDataStatus *cms.Tag `json:"plateau_data_status,omitempty" cms:"plateau_data_status,select,metadata"`
RelatedDataStatus *cms.Tag `json:"related_data_status,omitempty" cms:"related_data_status,select,metadata"`
CityPublic bool `json:"city_public,omitempty" cms:"city_public,bool,metadata"`
SDKPublic bool `json:"sdk_public,omitempty" cms:"sdk_public,bool,metadata"`
RelatedPublic bool `json:"related_public,omitempty" cms:"related_public,bool,metadata"`
Public map[string]bool `json:"public,omitempty" cms:"-"`
Expand Down Expand Up @@ -109,7 +110,7 @@ func (c *CityItem) GetOpenDataURL() string {
}

func (i *CityItem) PlateauStage(ft string) stage {
if ft != "" && i.Public[ft] {
if i.CityPublic || ft != "" && i.Public[ft] {
return stageGA
}
if i.PlateauDataStatus != nil && i.PlateauDataStatus.Name == string(ManagementStatusReady) {
Expand Down

0 comments on commit 371b776

Please sign in to comment.