Projet

Général

Profil

0001-manager-do-not-crash-on-csv-user-import-modification.patch

Paul Marillonnet, 21 juin 2019 17:24

Télécharger (1,07 ko)

Voir les différences:

Subject: [PATCH] manager: do not crash on csv user import modification
 (#34230)

 src/authentic2/manager/forms.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
src/authentic2/manager/forms.py
780 780
        from authentic2.csv_import import CsvImporter
781 781
        encoding = self.cleaned_data['encoding']
782 782
        with self.user_import.import_file as fd:
783
            importer = CsvImporter(fd, encoding)
784
            if not importer.run():
783
            importer = CsvImporter()
784
            if not importer.run(fd, encoding):
785 785
                raise forms.ValidationError(importer.error.description or importer.error.code)
786 786
            self.cleaned_data['rows_count'] = len(importer.rows)
787 787

  
788
-