mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-04-09 09:58:20 -05:00
Removes variable which was never set, removed unneeded serializer method
This commit is contained in:
parent
d7f7d839f8
commit
398f6e5b0c
@ -573,10 +573,6 @@ class StoragePathSerializer(MatchingModelSerializer):
|
|||||||
|
|
||||||
return path
|
return path
|
||||||
|
|
||||||
def create(self, validated_data):
|
|
||||||
storage_path = StoragePath.objects.create(**validated_data)
|
|
||||||
return storage_path
|
|
||||||
|
|
||||||
|
|
||||||
class UiSettingsViewSerializer(serializers.ModelSerializer):
|
class UiSettingsViewSerializer(serializers.ModelSerializer):
|
||||||
class Meta:
|
class Meta:
|
||||||
|
@ -93,7 +93,6 @@ def consume_file(
|
|||||||
else:
|
else:
|
||||||
separators = []
|
separators = []
|
||||||
document_list = []
|
document_list = []
|
||||||
converted_tiff = None
|
|
||||||
|
|
||||||
if mime_type == "image/tiff":
|
if mime_type == "image/tiff":
|
||||||
file_to_process = barcodes.convert_from_tiff_to_pdf(path)
|
file_to_process = barcodes.convert_from_tiff_to_pdf(path)
|
||||||
@ -117,13 +116,17 @@ def consume_file(
|
|||||||
else:
|
else:
|
||||||
newname = None
|
newname = None
|
||||||
barcodes.save_to_dir(document, newname=newname)
|
barcodes.save_to_dir(document, newname=newname)
|
||||||
|
|
||||||
# if we got here, the document was successfully split
|
# if we got here, the document was successfully split
|
||||||
# and can safely be deleted
|
# and can safely be deleted
|
||||||
if converted_tiff is not None:
|
if mime_type == "image/tiff":
|
||||||
|
# Remove the TIFF converted to PDF file
|
||||||
logger.debug(f"Deleting file {file_to_process}")
|
logger.debug(f"Deleting file {file_to_process}")
|
||||||
os.unlink(file_to_process)
|
os.unlink(file_to_process)
|
||||||
|
# Remove the original file (new file is saved above)
|
||||||
logger.debug(f"Deleting file {path}")
|
logger.debug(f"Deleting file {path}")
|
||||||
os.unlink(path)
|
os.unlink(path)
|
||||||
|
|
||||||
# notify the sender, otherwise the progress bar
|
# notify the sender, otherwise the progress bar
|
||||||
# in the UI stays stuck
|
# in the UI stays stuck
|
||||||
payload = {
|
payload = {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user