Commit d6ddf4f9 authored by Sylvain Thénault's avatar Sylvain Thénault
Browse files

Fix to make import of concepts working on an existing scheme

it was crashing because of junk inserted in the posted data with an existing
entity (eid, __maineid, etc.)

Closes #17106504
parent 06aa0a4ce636
......@@ -348,8 +348,9 @@ class ImportSchemeConceptsView(ImportSchemeConceptsMixIn, EntityView):
posted = form.process_posted()
if 'stream' not in posted: #
raise ValidationError(None, {'stream': self._cw.__("required field")})
posted['delimiter'] = CSV_DELIMITERS[posted['delimiter']]
_handle_concepts_import(self._cw, entity, posted.pop('format'), **posted)
kwargs = { posted[] for field in form._fields_}
kwargs['delimiter'] = CSV_DELIMITERS[kwargs['delimiter']]
_handle_concepts_import(self._cw, entity, kwargs.pop('format'), **kwargs)
raise Redirect(entity.absolute_url(__message=self._cw._('Import completed')))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment