Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error when exporting / importing rack list #3749

Open
loafyloaf opened this issue Jan 8, 2023 · 0 comments
Open

error when exporting / importing rack list #3749

loafyloaf opened this issue Jan 8, 2023 · 0 comments

Comments

@loafyloaf
Copy link

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant