mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-08 15:55:31 +01:00
logging: don't group by logging_group
This commit is contained in:
parent
d6d37efa35
commit
2b0b3a70a7
6 changed files with 54 additions and 104 deletions
|
|
@ -1,11 +1,10 @@
|
|||
from django_filters.rest_framework import BooleanFilter, FilterSet
|
||||
|
||||
from .models import Correspondent, Document, Tag, DocumentType
|
||||
|
||||
from .models import Correspondent, Document, Tag, DocumentType, Log
|
||||
|
||||
CHAR_KWARGS = ["istartswith", "iendswith", "icontains", "iexact"]
|
||||
ID_KWARGS = ["in", "exact"]
|
||||
INT_KWARGS = ["exact"]
|
||||
INT_KWARGS = ["exact", "gt", "gte", "lt", "lte"]
|
||||
DATE_KWARGS = ["year", "month", "day", "date__gt", "gt", "date__lt", "lt"]
|
||||
|
||||
|
||||
|
|
@ -68,3 +67,16 @@ class DocumentFilterSet(FilterSet):
|
|||
"document_type__name": CHAR_KWARGS,
|
||||
|
||||
}
|
||||
|
||||
|
||||
class LogFilterSet(FilterSet):
|
||||
|
||||
class Meta:
|
||||
model = Log
|
||||
fields = {
|
||||
|
||||
"level": INT_KWARGS,
|
||||
"created": DATE_KWARGS,
|
||||
"group": ID_KWARGS
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue