thomasbrueggemann / paperless-desktop

🍃 macOS app that uses the paperless API to manage your document scans.
GNU General Public License v3.0
582 stars 52 forks source link

Correspondents filter in Document view doesn't filter #47

Open markusappel opened 5 years ago

markusappel commented 5 years ago

Expected Behavior

... to see only documents matching the correspondent when selecting one in the document view in the menu on the left

Actual Behavior

... seeing all documents (unfiltered)

Steps to Reproduce the Problem

click on a correspondent to select it

Specifications

More info

Not sure if this is a paperless or a paperless-desktop problem? Either way, many thanks to the developers of both projects!

markusappel commented 5 years ago

Hm, I see that this might have to do with a changed django-filter API mentioned here: https://github.com/danielquinn/paperless/issues/412 Seems like the API request needs to be something like api/documents/?correspondent__slug__contains=lemontorge now, at least this works in the paperless browser API and a quick change in paperless-desktop revives the filter functionality...

I guess a clean fix would need to check paperless' version and adapt to it?

thomasbrueggemann commented 5 years ago

While reading the first lines of your comment I thought: "It would be awesome to retrieve the version number of Paperless, otherwise we'll eventually loose backwards compatibility". I could imagine a dedicated endpoint in paperless that responds with a version number, or sending the version number as an HTTP header in response to every request. That way Paperless Desktop could initially perform a GET on any ressource of Paperless and determine the version number and if none is returned assume a version number lower than X. Where X is the point in time that the version number retrieval was implemented.

thomasbrueggemann commented 5 years ago

Or let the user select the version number in Paperless Desktop