mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-15 19:17:03 +01:00
unified document matching, legacy and automatching work alongside now
This commit is contained in:
parent
9e4147ac52
commit
11af74ba36
16 changed files with 629 additions and 225 deletions
|
|
@ -12,9 +12,8 @@ def re_slug_all_the_things(apps, schema_editor):
|
|||
|
||||
Tag = apps.get_model("documents", "Tag")
|
||||
Correspondent = apps.get_model("documents", "Correspondent")
|
||||
DocumentType = apps.get_model("documents", "DocumentType")
|
||||
|
||||
for klass in (Tag, Correspondent, DocumentType):
|
||||
for klass in (Tag, Correspondent):
|
||||
for instance in klass.objects.all():
|
||||
klass.objects.filter(
|
||||
pk=instance.pk
|
||||
|
|
@ -26,7 +25,7 @@ def re_slug_all_the_things(apps, schema_editor):
|
|||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('documents', '1003_auto_20180904_1425'),
|
||||
('documents', '0021_document_storage_type'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
|
|
@ -49,10 +48,5 @@ class Migration(migrations.Migration):
|
|||
name='slug',
|
||||
field=models.SlugField(blank=True, editable=False),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='documenttype',
|
||||
name='slug',
|
||||
field=models.SlugField(blank=True, editable=False),
|
||||
),
|
||||
migrations.RunPython(re_slug_all_the_things, migrations.RunPython.noop)
|
||||
]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue