Skip to content

Commit 6b56e09

Browse files
committed
Fix priority comparison
1 parent 5b810ea commit 6b56e09

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

pkg/config/record.go

+4
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ func (r Record) GetData() string {
3838
}
3939

4040
func (r Record) GetPriority() string {
41+
if r.Priority == 0 {
42+
return ""
43+
}
44+
4145
return fmt.Sprint(r.Priority)
4246
}
4347

pkg/providers/porkbun/record/record.go

+4
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ func (r Record) GetData() string {
2929
}
3030

3131
func (r Record) GetPriority() string {
32+
if r.Priority == "0" {
33+
return ""
34+
}
35+
3236
return r.Priority
3337
}
3438

0 commit comments

Comments
 (0)