Skip to content

Commit b20d5f4

Browse files
authored
Merge pull request #988 from weichou1229/issue-987
fix: Allow Auto event duration is empty
2 parents db8453d + a5c1c90 commit b20d5f4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

dtos/autoevent.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ type AutoEvent struct {
2121
type Retention struct {
2222
MaxCap int64 `json:"maxCap" yaml:"maxCap"`
2323
MinCap int64 `json:"minCap" yaml:"minCap"`
24-
Duration string `json:"duration" yaml:"duration" validate:"edgex-dto-duration=0s"`
24+
Duration string `json:"duration" yaml:"duration" validate:"omitempty,edgex-dto-duration=0s"`
2525
}
2626

2727
// ToAutoEventModel transforms the AutoEvent DTO to the AutoEvent model

0 commit comments

Comments
 (0)