Skip to content

Commit

Permalink
fix(dbm-services): import mach set label defaut val #9058
Browse files Browse the repository at this point in the history
  • Loading branch information
ymakedaq authored and iSecloud committed Jan 14, 2025
1 parent 7bbded4 commit bd685b3
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,9 @@ type ImportHostResp struct {
}

func (p ImportMachParam) transParamToBytes() (lableJson json.RawMessage, err error) {
if len(p.Labels) == 0 {
return []byte("[]"), nil
}
lableJson, err = json.Marshal(p.Labels)
if err != nil {
logger.Error(fmt.Sprintf("ConverLableToJsonStr Failed,Error:%s", err.Error()))
Expand Down

0 comments on commit bd685b3

Please sign in to comment.