From d5018af2a3f137a20941af834f1cc3b069914d44 Mon Sep 17 00:00:00 2001 From: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Sun, 7 Aug 2022 17:45:49 -0700 Subject: [PATCH] python code style --- .../management/commands/document_exporter.py | 7 +++++-- src/documents/models.py | 13 ++++++++----- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/src/documents/management/commands/document_exporter.py b/src/documents/management/commands/document_exporter.py index da00d10f5..1493bf078 100644 --- a/src/documents/management/commands/document_exporter.py +++ b/src/documents/management/commands/document_exporter.py @@ -127,8 +127,11 @@ class Command(BaseCommand): serializers.serialize("json", DocumentType.objects.all()), ) - manifest += json.loads( - serializers.serialize("json", Comment.objects.all())), + manifest += ( + json.loads( + serializers.serialize("json", Comment.objects.all()), + ), + ) documents = Document.objects.order_by("id") document_map = {d.pk: d for d in documents} diff --git a/src/documents/models.py b/src/documents/models.py index cb64946c3..b2070d2f1 100644 --- a/src/documents/models.py +++ b/src/documents/models.py @@ -538,16 +538,19 @@ class PaperlessTask(models.Model): ) acknowledged = models.BooleanField(default=False) + class Comment(models.Model): comment = models.TextField( _("content"), blank=True, - help_text=_("Comment for the document") + help_text=_("Comment for the document"), ) created = models.DateTimeField( _("created"), - default=timezone.now, db_index=True) + default=timezone.now, + db_index=True, + ) document = models.ForeignKey( Document, @@ -555,7 +558,7 @@ class Comment(models.Model): null=True, related_name="documents", on_delete=models.CASCADE, - verbose_name=_("document") + verbose_name=_("document"), ) user = models.ForeignKey( @@ -564,7 +567,7 @@ class Comment(models.Model): null=True, related_name="users", on_delete=models.SET_NULL, - verbose_name=_("user") + verbose_name=_("user"), ) class Meta: @@ -573,4 +576,4 @@ class Comment(models.Model): verbose_name_plural = _("comments") def __str__(self): - return self.content \ No newline at end of file + return self.content