Closed egillet closed 6 years ago
The bool type is not working now. The offending line is in model/schema/mapping.cr at line 80:
model/schema/mapping.cr
@\\{{field[:name].id}} = value.as(\\{{field[:type].id}}) || \\{{field[:default] || nil.id}}
The || operator is not working for false value, and it replaces false by nil (or the default value). A possible solution is to replace the line by this:
@\\{{field[:name].id}} = value.nil? ? \\{{field[:default] || nil.id}} : value.as(\\{{field[:type].id}})
The bool type is not working now. The offending line is in
model/schema/mapping.cr
at line 80:The || operator is not working for false value, and it replaces false by nil (or the default value). A possible solution is to replace the line by this: