[Please complete the below template with details of the problem reported on your Web-UI. Be as detailed as possible. Community members, including developers, shall try and help. Thanks for your time in reporting this issue! We recommend purchasing commercial support for expedited support directly from the developers.]
Brief description of the problem
I was trying to set a static IP and got this error.
Detailed step by step instructions to reproduce the problem
[write here]
Web-UI screenshot
[Drag and drop the image here]
Error Traceback provided on the Web-UI
Traceback (most recent call last):
File “/opt/rockstor/src/rockstor/rest_framework_custom/generic_view.py”, line 40, in _handle_exception
yield
File “/opt/rockstor/src/rockstor/storageadmin/views/network.py”, line 534, in put
return Response(NetworkConnectionSerializer(nco).data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/opt/rockstor/.venv/lib/python3.11/site-packages/rest_framework/serializers.py”, line 571, in data
ret = super().data
^^^^^^^^^^^^
File “/opt/rockstor/.venv/lib/python3.11/site-packages/rest_framework/serializers.py”, line 249, in data
self._data = self.to_representation(self.instance)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/opt/rockstor/.venv/lib/python3.11/site-packages/rest_framework/serializers.py”, line 525, in to_representation
attribute = field.get_attribute(instance)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/opt/rockstor/.venv/lib/python3.11/site-packages/rest_framework/fields.py”, line 437, in get_attribute
return get_attribute(instance, self.source_attrs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/opt/rockstor/.venv/lib/python3.11/site-packages/rest_framework/fields.py”, line 104, in get_attribute
instance = getattr(instance, attr)
^^^^^^^^^^^^^^^^^^^^^^^
File “/opt/rockstor/src/rockstor/storageadmin/models/network_interface.py”, line 81, in ctype
if self.ethernetconnection_set.count() > 0:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/opt/rockstor/.venv/lib/python3.11/site-packages/django/db/models/manager.py”, line 87, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^
File “/opt/rockstor/.venv/lib/python3.11/site-packages/django/db/models/fields/related_descriptors.py”, line 718, in get_queryset
raise ValueError(
ValueError: ‘NetworkConnection’ instance needs to have a primary key value before this relationship can be used.