mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-04-17 10:13:56 -05:00
Merge branch 'dev' into chore/fix-minor-warning
This commit is contained in:
commit
cdd96750fa
12
.github/workflows/ci.yml
vendored
12
.github/workflows/ci.yml
vendored
@ -167,7 +167,9 @@ jobs:
|
|||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: backend-coverage-report
|
name: backend-coverage-report
|
||||||
path: coverage.xml
|
path: |
|
||||||
|
coverage.xml
|
||||||
|
junit.xml
|
||||||
retention-days: 7
|
retention-days: 7
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
-
|
-
|
||||||
@ -315,6 +317,14 @@ jobs:
|
|||||||
# future expansion
|
# future expansion
|
||||||
flags: backend
|
flags: backend
|
||||||
directory: src/
|
directory: src/
|
||||||
|
-
|
||||||
|
name: Upload test results to Codecov
|
||||||
|
if: ${{ !cancelled() }}
|
||||||
|
uses: codecov/test-results-action@v1
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.CODECOV_TOKEN }}
|
||||||
|
flags: backend
|
||||||
|
directory: src/
|
||||||
-
|
-
|
||||||
name: Use Node.js 20
|
name: Use Node.js 20
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
|
@ -329,6 +329,8 @@ addopts = [
|
|||||||
"--maxprocesses=16",
|
"--maxprocesses=16",
|
||||||
"--quiet",
|
"--quiet",
|
||||||
"--durations=50",
|
"--durations=50",
|
||||||
|
"--junitxml=junit.xml",
|
||||||
|
"-o junit_family=legacy",
|
||||||
]
|
]
|
||||||
norecursedirs = [ "src/locale/", ".venv/", "src-ui/" ]
|
norecursedirs = [ "src/locale/", ".venv/", "src-ui/" ]
|
||||||
|
|
||||||
|
@ -36,7 +36,6 @@ from documents.models import CustomField
|
|||||||
from documents.models import CustomFieldInstance
|
from documents.models import CustomFieldInstance
|
||||||
from documents.models import Document
|
from documents.models import Document
|
||||||
from documents.models import DocumentType
|
from documents.models import DocumentType
|
||||||
from documents.models import Log
|
|
||||||
from documents.models import PaperlessTask
|
from documents.models import PaperlessTask
|
||||||
from documents.models import ShareLink
|
from documents.models import ShareLink
|
||||||
from documents.models import StoragePath
|
from documents.models import StoragePath
|
||||||
@ -761,12 +760,6 @@ class DocumentFilterSet(FilterSet):
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
class LogFilterSet(FilterSet):
|
|
||||||
class Meta:
|
|
||||||
model = Log
|
|
||||||
fields = {"level": INT_KWARGS, "created": DATE_KWARGS, "group": ID_KWARGS}
|
|
||||||
|
|
||||||
|
|
||||||
class ShareLinkFilterSet(FilterSet):
|
class ShareLinkFilterSet(FilterSet):
|
||||||
class Meta:
|
class Meta:
|
||||||
model = ShareLink
|
model = ShareLink
|
||||||
|
15
src/documents/migrations/1064_delete_log.py
Normal file
15
src/documents/migrations/1064_delete_log.py
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
# Generated by Django 5.1.6 on 2025-02-28 15:19
|
||||||
|
|
||||||
|
from django.db import migrations
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
dependencies = [
|
||||||
|
("documents", "1063_paperlesstask_type_alter_paperlesstask_task_name_and_more"),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.DeleteModel(
|
||||||
|
name="Log",
|
||||||
|
),
|
||||||
|
]
|
@ -1,5 +1,4 @@
|
|||||||
import datetime
|
import datetime
|
||||||
import logging
|
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
@ -379,36 +378,6 @@ class Document(SoftDeleteModel, ModelWithOwner):
|
|||||||
return timezone.localdate(self.created)
|
return timezone.localdate(self.created)
|
||||||
|
|
||||||
|
|
||||||
class Log(models.Model):
|
|
||||||
LEVELS = (
|
|
||||||
(logging.DEBUG, _("debug")),
|
|
||||||
(logging.INFO, _("information")),
|
|
||||||
(logging.WARNING, _("warning")),
|
|
||||||
(logging.ERROR, _("error")),
|
|
||||||
(logging.CRITICAL, _("critical")),
|
|
||||||
)
|
|
||||||
|
|
||||||
group = models.UUIDField(_("group"), blank=True, null=True)
|
|
||||||
|
|
||||||
message = models.TextField(_("message"))
|
|
||||||
|
|
||||||
level = models.PositiveIntegerField(
|
|
||||||
_("level"),
|
|
||||||
choices=LEVELS,
|
|
||||||
default=logging.INFO,
|
|
||||||
)
|
|
||||||
|
|
||||||
created = models.DateTimeField(_("created"), auto_now_add=True)
|
|
||||||
|
|
||||||
class Meta:
|
|
||||||
ordering = ("-created",)
|
|
||||||
verbose_name = _("log")
|
|
||||||
verbose_name_plural = _("logs")
|
|
||||||
|
|
||||||
def __str__(self):
|
|
||||||
return self.message
|
|
||||||
|
|
||||||
|
|
||||||
class SavedView(ModelWithOwner):
|
class SavedView(ModelWithOwner):
|
||||||
class DisplayMode(models.TextChoices):
|
class DisplayMode(models.TextChoices):
|
||||||
TABLE = ("table", _("Table"))
|
TABLE = ("table", _("Table"))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user