Fix: including ordering param for id__in retrievals from frontend (#6875)

This commit is contained in:
shamoon
2024-06-01 19:28:31 -07:00
committed by GitHub
parent 085447e7c4
commit d2883b83c5
6 changed files with 24 additions and 5 deletions

View File

@@ -94,6 +94,7 @@ export abstract class AbstractPaperlessService<T extends ObjectWithId> {
getFew(ids: number[], extraParams?): Observable<Results<T>> {
let httpParams = new HttpParams()
httpParams = httpParams.set('id__in', ids.join(','))
httpParams = httpParams.set('ordering', '-id')
for (let extraParamKey in extraParams) {
if (extraParams[extraParamKey] != null) {
httpParams = httpParams.set(extraParamKey, extraParams[extraParamKey])