diff --git a/openslides/motion/csv_import.py b/openslides/motion/csv_import.py index 694990ad7..14ee309a5 100644 --- a/openslides/motion/csv_import.py +++ b/openslides/motion/csv_import.py @@ -46,7 +46,7 @@ def import_motions(csv_file, default_submitter, override=False, importing_person try: csv_file.read().decode('utf8') except UnicodeDecodeError: - return (0, [_('Import file has wrong character encoding, only UTF-8 is supported!')], []) + return (0, 0, [_('Import file has wrong character encoding, only UTF-8 is supported!')], []) csv_file.seek(0) with transaction.commit_on_success(): diff --git a/tests/motion/test_csv_import.py b/tests/motion/test_csv_import.py index 3966a00c1..0d2883c6d 100644 --- a/tests/motion/test_csv_import.py +++ b/tests/motion/test_csv_import.py @@ -93,6 +93,9 @@ class CSVImport(TestCase): text = u'Müller'.encode('iso-8859-15') csv_file.write(text) csv_file.seek(0) - count_success, error_messages, warning_messages = import_motions(csv_file=csv_file, default_submitter=self.normal_user.person_id) + count_success, count_lines, error_messages, warning_messages = import_motions( + csv_file=csv_file, + default_submitter=self.normal_user.person_id) self.assertEqual(count_success, 0) + self.assertEqual(count_lines, 0) self.assertTrue('Import file has wrong character encoding, only UTF-8 is supported!' in error_messages)