You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to export/import racks across ralph instances, a server error is thrown
Steps to reproduce
Create several racks in an instance of ralph. Export the list. Try to import it in another instance.
ERROR [MainProcess 936] base - Internal Server Error: /data_center/rack/process_import/
Traceback (most recent call last):
File "/opt/ralph/ralph-core/lib/python3.6/site-packages/django/core/handlers/base.py", line 132, in get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/usr/lib/python3.6/contextlib.py", line 52, in inner
return func(*args, **kwds)
File "/opt/ralph/ralph-core/lib/python3.6/site-packages/django/utils/decorators.py", line 110, in _wrapped_view
response = view_func(request, *args, **kwargs)
File "/opt/ralph/ralph-core/lib/python3.6/site-packages/django/views/decorators/cache.py", line 57, in _wrapped_view_func
response = view_func(request, *args, **kwargs)
File "/opt/ralph/ralph-core/lib/python3.6/site-packages/django/contrib/admin/sites.py", line 233, in inner
return view(request, *args, **kwargs)
File "/opt/ralph/ralph-core/lib/python3.6/site-packages/import_export/admin.py", line 159, in process_import
user=request.user)
File "/usr/lib/python3.6/contextlib.py", line 52, in inner
return func(*args, **kwds)
File "/opt/ralph/ralph-core/lib/python3.6/site-packages/import_export/resources.py", line 395, in import_data
six.reraise(*sys.exc_info())
File "/opt/ralph/ralph-core/lib/python3.6/site-packages/django/utils/six.py", line 686, in reraise
raise value
File "/opt/ralph/ralph-core/lib/python3.6/site-packages/import_export/resources.py", line 379, in import_data
self.save_m2m(instance, row, real_dry_run)
File "/opt/ralph/ralph-core/lib/python3.6/site-packages/import_export/resources.py", line 251, in save_m2m
self.import_field(field, obj, data)
File "/opt/ralph/ralph-core/lib/python3.6/site-packages/import_export/resources.py", line 230, in import_field
field.save(obj, data)
File "/opt/ralph/ralph-core/lib/python3.6/site-packages/import_export/fields.py", line 108, in save
setattr(obj, attrs[-1], self.clean(data))
File "/opt/ralph/ralph-core/lib/python3.6/site-packages/django/db/models/fields/related.py", line 1261, in set
"intermediary model. Use %s.%s's Manager instead." % (opts.app_label, opts.object_name)
AttributeError: Cannot set values on a ManyToManyField which specifies an intermediary model. Use data_center.RackAccessory's Manager instead.
Expected behavior
List should import.
Actual behavior
Server error listed above.
Environment
Ralph version: 20230103.1
Operating system: ubuntu 18
Method of installation: Deb package? Manual installation? Docker? deb package
The text was updated successfully, but these errors were encountered:
When trying to export/import racks across ralph instances, a server error is thrown
Steps to reproduce
Create several racks in an instance of ralph. Export the list. Try to import it in another instance.
ERROR [MainProcess 936] base - Internal Server Error: /data_center/rack/process_import/
Traceback (most recent call last):
File "/opt/ralph/ralph-core/lib/python3.6/site-packages/django/core/handlers/base.py", line 132, in get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/usr/lib/python3.6/contextlib.py", line 52, in inner
return func(*args, **kwds)
File "/opt/ralph/ralph-core/lib/python3.6/site-packages/django/utils/decorators.py", line 110, in _wrapped_view
response = view_func(request, *args, **kwargs)
File "/opt/ralph/ralph-core/lib/python3.6/site-packages/django/views/decorators/cache.py", line 57, in _wrapped_view_func
response = view_func(request, *args, **kwargs)
File "/opt/ralph/ralph-core/lib/python3.6/site-packages/django/contrib/admin/sites.py", line 233, in inner
return view(request, *args, **kwargs)
File "/opt/ralph/ralph-core/lib/python3.6/site-packages/import_export/admin.py", line 159, in process_import
user=request.user)
File "/usr/lib/python3.6/contextlib.py", line 52, in inner
return func(*args, **kwds)
File "/opt/ralph/ralph-core/lib/python3.6/site-packages/import_export/resources.py", line 395, in import_data
six.reraise(*sys.exc_info())
File "/opt/ralph/ralph-core/lib/python3.6/site-packages/django/utils/six.py", line 686, in reraise
raise value
File "/opt/ralph/ralph-core/lib/python3.6/site-packages/import_export/resources.py", line 379, in import_data
self.save_m2m(instance, row, real_dry_run)
File "/opt/ralph/ralph-core/lib/python3.6/site-packages/import_export/resources.py", line 251, in save_m2m
self.import_field(field, obj, data)
File "/opt/ralph/ralph-core/lib/python3.6/site-packages/import_export/resources.py", line 230, in import_field
field.save(obj, data)
File "/opt/ralph/ralph-core/lib/python3.6/site-packages/import_export/fields.py", line 108, in save
setattr(obj, attrs[-1], self.clean(data))
File "/opt/ralph/ralph-core/lib/python3.6/site-packages/django/db/models/fields/related.py", line 1261, in set
"intermediary model. Use %s.%s's Manager instead." % (opts.app_label, opts.object_name)
AttributeError: Cannot set values on a ManyToManyField which specifies an intermediary model. Use data_center.RackAccessory's Manager instead.
Expected behavior
List should import.
Actual behavior
Server error listed above.
Environment
The text was updated successfully, but these errors were encountered: