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
Nautobot version (Docker tag too if applicable): 2.3.15
Python version: 3.12
Database platform, version: Postgress 14.15
Middleware(s):
Steps to Reproduce
Exported devices from one nautobot instance running the same version of code
Tried to import the exported cvs file into the second instance of nautobot
Error shows saying type object 'ContentType' has no attribute 'label_lower'"
Expected Behavior
I expected the devices to be created if no other dependencies where required
Observed Behavior
Traceback (most recent call last):
File "/opt/nautobot/lib/python3.10/site-packages/celery/app/trace.py", line 477, in trace_task
R = retval = fun(*args, **kwargs)
File "/opt/nautobot/lib/python3.10/site-packages/celery/app/trace.py", line 760, in protected_call
return self.run(*args, **kwargs)
File "/opt/nautobot/lib/python3.10/site-packages/nautobot/extras/jobs.py", line 1138, in run_job
result = job(*args, **kwargs)
File "/opt/nautobot/lib/python3.10/site-packages/nautobot/extras/jobs.py", line 151, in call
return self.run(*args, **deserialized_kwargs)
File "/opt/nautobot/lib/python3.10/site-packages/nautobot/core/jobs/init.py", line 330, in run
new_objs, validation_failed = self._perform_atomic_operation(data, serializer_class, queryset)
File "/opt/nautobot/lib/python3.10/site-packages/nautobot/core/jobs/init.py", line 255, in _perform_atomic_operation
new_objs, validation_failed = self._perform_operation(data, serializer_class, queryset)
File "/opt/nautobot/lib/python3.10/site-packages/nautobot/core/jobs/init.py", line 268, in _perform_operation
if serializer.is_valid():
File "/opt/nautobot/lib/python3.10/site-packages/rest_framework/serializers.py", line 223, in is_valid
self._validated_data = self.run_validation(self.initial_data)
File "/opt/nautobot/lib/python3.10/site-packages/rest_framework/serializers.py", line 442, in run_validation
value = self.to_internal_value(data)
File "/opt/nautobot/lib/python3.10/site-packages/rest_framework/serializers.py", line 499, in to_internal_value
validated_value = field.run_validation(primitive_value)
File "/opt/nautobot/lib/python3.10/site-packages/rest_framework/relations.py", line 155, in run_validation
return super().run_validation(data)
File "/opt/nautobot/lib/python3.10/site-packages/rest_framework/fields.py", line 538, in run_validation
value = self.to_internal_value(data)
File "/opt/nautobot/lib/python3.10/site-packages/nautobot/core/api/fields.py", line 215, in to_internal_value
elif related_model is not None and related_model.label_lower == "auth.group":
AttributeError: type object 'ContentType' has no attribute 'label_lower'
As per request on the slack channel, creating an issue for this
The text was updated successfully, but these errors were encountered:
Appears to be a bug here in that related_model.label_lower should probably be related_model._meta.label_lower. Need to come up with a good test case to reproduce this issue though and identify why it wasn't caught by existing CSV tests.
Environment
Steps to Reproduce
Expected Behavior
I expected the devices to be created if no other dependencies where required
Observed Behavior
Traceback (most recent call last):
File "/opt/nautobot/lib/python3.10/site-packages/celery/app/trace.py", line 477, in trace_task
R = retval = fun(*args, **kwargs)
File "/opt/nautobot/lib/python3.10/site-packages/celery/app/trace.py", line 760, in protected_call
return self.run(*args, **kwargs)
File "/opt/nautobot/lib/python3.10/site-packages/nautobot/extras/jobs.py", line 1138, in run_job
result = job(*args, **kwargs)
File "/opt/nautobot/lib/python3.10/site-packages/nautobot/extras/jobs.py", line 151, in call
return self.run(*args, **deserialized_kwargs)
File "/opt/nautobot/lib/python3.10/site-packages/nautobot/core/jobs/init.py", line 330, in run
new_objs, validation_failed = self._perform_atomic_operation(data, serializer_class, queryset)
File "/opt/nautobot/lib/python3.10/site-packages/nautobot/core/jobs/init.py", line 255, in _perform_atomic_operation
new_objs, validation_failed = self._perform_operation(data, serializer_class, queryset)
File "/opt/nautobot/lib/python3.10/site-packages/nautobot/core/jobs/init.py", line 268, in _perform_operation
if serializer.is_valid():
File "/opt/nautobot/lib/python3.10/site-packages/rest_framework/serializers.py", line 223, in is_valid
self._validated_data = self.run_validation(self.initial_data)
File "/opt/nautobot/lib/python3.10/site-packages/rest_framework/serializers.py", line 442, in run_validation
value = self.to_internal_value(data)
File "/opt/nautobot/lib/python3.10/site-packages/rest_framework/serializers.py", line 499, in to_internal_value
validated_value = field.run_validation(primitive_value)
File "/opt/nautobot/lib/python3.10/site-packages/rest_framework/relations.py", line 155, in run_validation
return super().run_validation(data)
File "/opt/nautobot/lib/python3.10/site-packages/rest_framework/fields.py", line 538, in run_validation
value = self.to_internal_value(data)
File "/opt/nautobot/lib/python3.10/site-packages/nautobot/core/api/fields.py", line 215, in to_internal_value
elif related_model is not None and related_model.label_lower == "auth.group":
AttributeError: type object 'ContentType' has no attribute 'label_lower'
As per request on the slack channel, creating an issue for this
The text was updated successfully, but these errors were encountered: