mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-07-28 18:24:38 -05:00
Prepare Paperless for new front end
- enable CORS for localhost calls - add Filter to allow API calls that can select Documents without any tag
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
from django_filters.rest_framework import CharFilter, FilterSet
|
||||
from django_filters.rest_framework import CharFilter, FilterSet, BooleanFilter
|
||||
|
||||
from .models import Correspondent, Document, Tag
|
||||
|
||||
@@ -46,6 +46,7 @@ class DocumentFilterSet(FilterSet):
|
||||
correspondent__slug = CharFilter(name="correspondent__slug", **CHAR_KWARGS)
|
||||
tags__name = CharFilter(name="tags__name", **CHAR_KWARGS)
|
||||
tags__slug = CharFilter(name="tags__slug", **CHAR_KWARGS)
|
||||
tags__empty = BooleanFilter(name='tags', lookup_expr='isnull', distinct=True)
|
||||
|
||||
class Meta(object):
|
||||
model = Document
|
||||
|
Reference in New Issue
Block a user