fix(filter): allow filtering for "project"

This commit is contained in:
kolaente 2023-11-21 18:35:33 +01:00
parent 3fc4aaa2a1
commit 764bc15d49
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 3 additions and 0 deletions

View File

@ -147,6 +147,9 @@ func getTaskFiltersByCollections(c *TaskCollection) (filters []*taskFilter, err
// Cast the field value to its native type
var reflectValue *reflect.StructField
if filter.field == "project" {
filter.field = "project_id"
}
reflectValue, filter.value, err = getNativeValueForTaskField(filter.field, filter.comparator, value)
if err != nil {
return nil, ErrInvalidTaskFilterValue{