Skip to content

Commit f7c0cdc

Browse files
authored
GetDKAN/dkan#2994 Fix how the sort parameter is built (#104)
1 parent 6db1ab7 commit f7c0cdc

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

backend.ckan_get.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,11 @@ this.recline.Backend.Ckan = this.recline.Backend.Ckan || {};
133133
for (var p in obj) {
134134
if (obj.hasOwnProperty(p)) {
135135
if (typeof obj[p] !== 'object') {
136-
str += '&' + p + '=' + obj[p] ;
136+
if(p == 'sort'){
137+
str += '&' + p + '[' + obj[p].split(' ')[0] + ']' + '=' + obj[p].split(' ')[1] ;
138+
}else{
139+
str += '&' + p + '=' + obj[p] ;
140+
}
137141
}
138142
}
139143
}

0 commit comments

Comments
 (0)