mirror of
https://github.com/inventree/InvenTree.git
synced 2026-04-09 13:01:05 +00:00
Skip import for zero length records (#11676)
This commit is contained in:
4
tasks.py
4
tasks.py
@@ -1276,6 +1276,10 @@ def import_records(
|
|||||||
nonlocal ignore_nonexistent
|
nonlocal ignore_nonexistent
|
||||||
nonlocal c
|
nonlocal c
|
||||||
|
|
||||||
|
# Skip if there is no data to load
|
||||||
|
if len(data) == 0:
|
||||||
|
return
|
||||||
|
|
||||||
info(f'Loading {len(data)} {title} records...')
|
info(f'Loading {len(data)} {title} records...')
|
||||||
|
|
||||||
with tempfile.NamedTemporaryFile(
|
with tempfile.NamedTemporaryFile(
|
||||||
|
|||||||
Reference in New Issue
Block a user