mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-04-02 13:45:10 -05:00
python code style
This commit is contained in:
parent
5c1e09cc48
commit
d5018af2a3
@ -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}
|
||||
|
@ -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
|
||||
return self.content
|
||||
|
Loading…
x
Reference in New Issue
Block a user