mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-04-17 10:13:56 -05:00
Fixes is_relative_to not being availible for 3.8
This commit is contained in:
parent
9aefff38e7
commit
77b3aa5011
@ -117,9 +117,11 @@ def consume_file(
|
|||||||
# Move it to consume directory to be picked up
|
# Move it to consume directory to be picked up
|
||||||
# Otherwise, use the current parent to keep possible tags
|
# Otherwise, use the current parent to keep possible tags
|
||||||
# from subdirectories
|
# from subdirectories
|
||||||
if path.is_relative_to(settings.SCRATCH_DIR):
|
try:
|
||||||
|
# is_relative_to would be nicer, but new in 3.9
|
||||||
|
_ = path.relative_to(settings.SCRATCH_DIR)
|
||||||
save_to_dir = settings.CONSUMPTION_DIR
|
save_to_dir = settings.CONSUMPTION_DIR
|
||||||
else:
|
except ValueError:
|
||||||
save_to_dir = path.parent
|
save_to_dir = path.parent
|
||||||
|
|
||||||
barcodes.save_to_dir(
|
barcodes.save_to_dir(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user