mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-04-02 13:45:10 -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
|
||||
|
||||
def create(self, validated_data):
|
||||
storage_path = StoragePath.objects.create(**validated_data)
|
||||
return storage_path
|
||||
|
||||
|
||||
class UiSettingsViewSerializer(serializers.ModelSerializer):
|
||||
class Meta:
|
||||
|
@ -93,7 +93,6 @@ def consume_file(
|
||||
else:
|
||||
separators = []
|
||||
document_list = []
|
||||
converted_tiff = None
|
||||
|
||||
if mime_type == "image/tiff":
|
||||
file_to_process = barcodes.convert_from_tiff_to_pdf(path)
|
||||
@ -117,13 +116,17 @@ def consume_file(
|
||||
else:
|
||||
newname = None
|
||||
barcodes.save_to_dir(document, newname=newname)
|
||||
|
||||
# if we got here, the document was successfully split
|
||||
# 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}")
|
||||
os.unlink(file_to_process)
|
||||
# Remove the original file (new file is saved above)
|
||||
logger.debug(f"Deleting file {path}")
|
||||
os.unlink(path)
|
||||
|
||||
# notify the sender, otherwise the progress bar
|
||||
# in the UI stays stuck
|
||||
payload = {
|
||||
|
Loading…
x
Reference in New Issue
Block a user