fix(filters): only insert task buckets and positions when there are any
This commit is contained in:
parent
03381f47bf
commit
bea81f83f7
@ -257,6 +257,7 @@ func (sf *SavedFilter) Update(s *xorm.Session, _ web.Auth) error {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if len(taskBuckets) > 0 && len(taskPositions) > 0 {
|
||||||
_, err = s.Insert(taskBuckets)
|
_, err = s.Insert(taskBuckets)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
@ -265,6 +266,7 @@ func (sf *SavedFilter) Update(s *xorm.Session, _ web.Auth) error {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user