Project

General

Profile

Bug #30810

traces import de roles

Added by Emmanuel Cazenave 5 months ago.

Status:
Nouveau
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
21 Feb 2019
Due date:
% Done:

0%

Patch proposed:
No
Planning:
No

Description

Sur un instance où il y a déjà existing.json, tenter d'importer to-import.json produit :

 authentic2-multitenant ERROR connexion-venissieux-test.demarches.sitiv.fr 80.12.92.47 ecazenave@entrouvert.com r:7F2BB31A2750 Internal Server Error: /
                                                              Traceback (most recent call last):
                                                                File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py", line 132, in get_response
                                                                  response = wrapped_callback(request, *callback_args, **callback_kwargs)
                                                                File "/usr/lib/python2.7/dist-packages/django/contrib/auth/decorators.py", line 22, in _wrapped_view
                                                                  return view_func(request, *args, **kwargs)
                                                                File "/usr/lib/python2.7/dist-packages/django/views/generic/base.py", line 71, in view
                                                                  return self.dispatch(request, *args, **kwargs)
                                                                File "/usr/lib/python2.7/dist-packages/authentic2/manager/views.py", line 707, in dispatch
                                                                  return super(SiteImportView, self).dispatch(request, *args, **kwargs)
                                                                File "/usr/lib/python2.7/dist-packages/django/views/generic/base.py", line 89, in dispatch
                                                                  return handler(request, *args, **kwargs)
                                                                File "/usr/lib/python2.7/dist-packages/django/views/generic/edit.py", line 215, in post
                                                                  return self.form_valid(form)
                                                                File "/usr/lib/python2.7/dist-packages/authentic2/manager/views.py", line 697, in form_valid
                                                                  import_site(json_site, ImportContext())
                                                                File "/usr/lib/python2.7/dist-packages/authentic2/data_transfer.py", line 303, in import_site
                                                                  result.update_parentings(*ds.parentings())
                                                                File "/usr/lib/python2.7/dist-packages/authentic2/data_transfer.py", line 194, in parentings
                                                                  parent = search_role(parent_d)
                                                                File "/usr/lib/python2.7/dist-packages/authentic2/data_transfer.py", line 71, in search_role
                                                                  return Role.objects.get_by_natural_key_json(role_d)
                                                                File "/usr/lib/python2.7/dist-packages/authentic2/natural_key.py", line 106, in get_by_natural_key_json
                                                                  return self.get(**get_kwargs)
                                                                File "/usr/lib/python2.7/dist-packages/django/db/models/manager.py", line 127, in manager_method
                                                                  return getattr(self.get_queryset(), name)(*args, **kwargs)
                                                                File "/usr/lib/python2.7/dist-packages/django/db/models/query.py", line 338, in get
                                                                  (self.model._meta.object_name, num)
                                                              MultipleObjectsReturned: get() returned more than one Role -- it returned 2!

Also available in: Atom PDF