mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-10 16:46:50 +01:00
replaced usages of .id with .pk, fixed filename issue in exporter
This commit is contained in:
parent
dc59e0f257
commit
68df1cf4ee
5 changed files with 15 additions and 13 deletions
|
|
@ -75,16 +75,16 @@ class DocumentClassifier(object):
|
|||
y = -1
|
||||
if doc.document_type:
|
||||
if doc.document_type.matching_algorithm == MatchingModel.MATCH_AUTO:
|
||||
y = doc.document_type.id
|
||||
y = doc.document_type.pk
|
||||
labels_document_type.append(y)
|
||||
|
||||
y = -1
|
||||
if doc.correspondent:
|
||||
if doc.correspondent.matching_algorithm == MatchingModel.MATCH_AUTO:
|
||||
y = doc.correspondent.id
|
||||
y = doc.correspondent.pk
|
||||
labels_correspondent.append(y)
|
||||
|
||||
tags = [tag.id for tag in doc.tags.filter(
|
||||
tags = [tag.pk for tag in doc.tags.filter(
|
||||
matching_algorithm=MatchingModel.MATCH_AUTO
|
||||
)]
|
||||
labels_tags.append(tags)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue