Key (object_type_id)=(55) is not present in table "django_content_type" #8809

Closed
opened 2025-12-29 20:41:33 +01:00 by adam · 0 comments
Owner

Originally created by @jepify on GitHub (Nov 6, 2023).

NetBox version

v3.6.4

Python version

3.11

Steps to Reproduce

Can not reproduce yet in a simple case. We are getting this issue during our testing in our pipelines.

We are simply creating a device with the pynetbox api

device = nb.dcim.devices.create(
                name=name,
                device_type=d_type.id,
                role=role.id,
                site=site.id,
                asset_tag=asset_tag,
                tags=tag_ids,
                serial=f"{serial_base}{number}",
                tenant=test_tenant.id,
                rack=rack,
            )

Expected Behavior

The device to be created

Observed Behavior

pynetbox.core.query.RequestError: The request failed with code 500 Internal Server Error: {'error': 'insert or update on table "extras_cachedvalue" violates foreign key constraint "extras_cachedvalue_object_type_id_6f47d444_fk_django_co"\nDETAIL: Key (object_type_id)=(55) is not present in table "django_content_type".', 'exception': 'IntegrityError', 'netbox_version': '3.6.4', 'python_version': '3.11.4'}

Originally created by @jepify on GitHub (Nov 6, 2023). ### NetBox version v3.6.4 ### Python version 3.11 ### Steps to Reproduce Can not reproduce yet in a simple case. We are getting this issue during our testing in our pipelines. We are simply creating a device with the pynetbox api ``` device = nb.dcim.devices.create( name=name, device_type=d_type.id, role=role.id, site=site.id, asset_tag=asset_tag, tags=tag_ids, serial=f"{serial_base}{number}", tenant=test_tenant.id, rack=rack, ) ``` ### Expected Behavior The device to be created ### Observed Behavior pynetbox.core.query.RequestError: The request failed with code 500 Internal Server Error: {'error': 'insert or update on table "extras_cachedvalue" violates foreign key constraint "extras_cachedvalue_object_type_id_6f47d444_fk_django_co"\nDETAIL: Key (object_type_id)=(55) is not present in table "django_content_type".', 'exception': 'IntegrityError', 'netbox_version': '3.6.4', 'python_version': '3.11.4'}
adam closed this issue 2025-12-29 20:41:33 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#8809