Fix: check if file is not empty and try importing it
This commit is contained in:
parent
ad07b5ce9e
commit
510fff3059
1 changed files with 1 additions and 1 deletions
|
@ -117,7 +117,7 @@ class BaseImporter(ABC):
|
||||||
hash_blake3=file_hash
|
hash_blake3=file_hash
|
||||||
)
|
)
|
||||||
|
|
||||||
if created:
|
if created or not file_instance.file:
|
||||||
with open(file_path, "rb") as file:
|
with open(file_path, "rb") as file:
|
||||||
file_instance.file.save(hash_file_name, file)
|
file_instance.file.save(hash_file_name, file)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue