Headers aren't one of the rows

This commit is contained in:
Mouse Reeve 2022-11-25 12:19:49 -08:00
parent 304757091e
commit 8b068e94d5

View file

@ -37,7 +37,7 @@ class Importer:
"""check over a csv and creates a database entry for the job"""
csv_reader = csv.DictReader(csv_file, delimiter=self.delimiter)
rows = list(csv_reader)
if len(rows) <= 1:
if len(rows) < 1:
raise ValueError("CSV file is empty")
rows = enumerate(rows)