unified "null" handling to be empty

This commit is contained in:
Freddy0 2024-07-16 19:46:30 +02:00 committed by GitHub
parent 758a317091
commit a117c159b0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -450,7 +450,7 @@ class ConsumerPlugin(
"document-thumb",
kwargs={"pk": document.pk},
)
script_env["DOCUMENT_OWNER"] = str(document.owner)
script_env["DOCUMENT_OWNER"] = document.owner.get_username() if document.owner else ""
script_env["DOCUMENT_CORRESPONDENT"] = str(document.correspondent)
script_env["DOCUMENT_TAGS"] = str(
",".join(document.tags.all().values_list("name", flat=True)),