Skip to content

Commit ce8471a

Browse files
committed
[core] Always say yes to null constraints against any attribute set
1 parent 9c0c4b4 commit ce8471a

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

core/task/constraint/attributes.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,14 @@ func (attrs Attributes) Get(attributeName string) (value string, ok bool) {
5656
}
5757

5858
func (attrs Attributes) Satisfy(cts Constraints) (ok bool) {
59-
if attrs == nil {
60-
return
61-
}
6259
if len(cts) == 0 {
6360
ok = true
6461
return
6562
}
63+
if attrs == nil {
64+
return
65+
}
66+
6667
for _, constraint := range cts {
6768
switch constraint.Operator {
6869
case Equals:

0 commit comments

Comments
 (0)