dchester / epilogue

Create flexible REST endpoints and controllers from Sequelize models in your Express app
846 stars 116 forks source link

Filter by boolean value not possible as it is interpreted as string #98

Closed xmakro closed 9 years ago

xmakro commented 9 years ago

Given the model:

var Task = sequelize.define("task", {
    archived: Sequelize.BOOLEAN
});

The following epilogue route:

/epilogue/tasks?archived=false

does not work. It throws:

{"message":"\"false\" is not a valid boolean","errors":[]}

It seems the value is interpreted as a string and never converted.

mbroadst commented 9 years ago

fixed in 0fff476ac179418efbe58fdbe32eeff39c70aab5