Update datatables.go

This commit is contained in:
Saúl Ortega 2018-02-23 14:50:27 -05:00 committed by GitHub
parent 410042044c
commit c3df2b7682
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -149,13 +149,12 @@ func parse(r *http.Request) (Filter, error) {
o := Order{Dir: dir}
for _, c := range F.Columns {
if c.Index == ic {
if c.Index == ic && c.Orderable {
o.Column = c
break
}
}
if o.Column == (Column{}) {
errores = append(errores, "column with index "+strconv.Itoa(ic)+" not found")
continue
}