mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-10-16 02:46:16 -05:00
Enhancement: document link field fixes (#5020)
* Implement more efficient getFew for document retrieval * Filter out parent document ID & already-selected documents * Clip very long document titles
This commit is contained in:
@@ -91,6 +91,19 @@ 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(','))
|
||||
for (let extraParamKey in extraParams) {
|
||||
if (extraParams[extraParamKey] != null) {
|
||||
httpParams = httpParams.set(extraParamKey, extraParams[extraParamKey])
|
||||
}
|
||||
}
|
||||
return this.http.get<Results<T>>(this.getResourceUrl(), {
|
||||
params: httpParams,
|
||||
})
|
||||
}
|
||||
|
||||
clearCache() {
|
||||
this._listAll = null
|
||||
}
|
||||
|
Reference in New Issue
Block a user