Skip import for zero length records (#11676)

This commit is contained in:
Oliver 2026-04-06 14:29:50 +10:00 committed by GitHub
parent e91f306245
commit 8896a494e8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 0 deletions

View File

@ -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(