From: Trenton H <797416+stumpylog@users.noreply.github.com> Date: Wed, 25 Oct 2023 23:18:13 +0000 (-0700) Subject: Fixes the returning of a set, change to a list instead (#4442) X-Git-Tag: v2.0.0-beta.1~38 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cb271deb8f2810504ce43676634f75c96a585a48;p=thirdparty%2Fpaperless-ngx.git Fixes the returning of a set, change to a list instead (#4442) --- diff --git a/src/documents/management/commands/document_consumer.py b/src/documents/management/commands/document_consumer.py index 64812ed884..f9f50dcb44 100644 --- a/src/documents/management/commands/document_consumer.py +++ b/src/documents/management/commands/document_consumer.py @@ -32,7 +32,7 @@ except ImportError: # pragma: nocover logger = logging.getLogger("paperless.management.consumer") -def _tags_from_path(filepath) -> set[Tag]: +def _tags_from_path(filepath) -> list[int]: """ Walk up the directory tree from filepath to CONSUMPTION_DIR and get or create Tag IDs for every directory. @@ -47,7 +47,7 @@ def _tags_from_path(filepath) -> set[Tag]: Tag.objects.get_or_create(name__iexact=part, defaults={"name": part})[0].pk, ) - return tag_ids + return list(tag_ids) def _is_ignored(filepath: str) -> bool: