do not require related document

This commit is contained in:
Tomáš Mládek 2020-06-10 10:13:28 +02:00
parent 6c9e07df73
commit 3af8a7e1a6
2 changed files with 19 additions and 1 deletions

View file

@ -0,0 +1,18 @@
# Generated by Django 3.0.4 on 2020-06-10 08:13
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('pile', '0011_document_related'),
]
operations = [
migrations.AlterField(
model_name='document',
name='related',
field=models.ManyToManyField(blank=True, related_name='_document_related_+', to='pile.Document'),
),
]

View file

@ -57,7 +57,7 @@ class Document(SoftDeletableModel):
max_length=3, choices=DocumentStatus.choices, default=DocumentStatus.STANDARD)
tags = models.ManyToManyField(Tag, related_name="documents", blank=True)
uploaded = models.DateTimeField(auto_now_add=True, null=True)
related = models.ManyToManyField('self', related_name='related')
related = models.ManyToManyField('self', related_name='related', blank=True)
objects = DocumentManager()