Fixes #20290: Avoid exceptions when upgrading to v4.4 from early releases due to missing ObjectTypes table #1114

Closed
opened 2026-04-05 20:47:04 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @jeremystretch on 10/6/2025

Fixes: #20290

This PR is submitted as an alternative to #20473.

  • Hook into ObjectType.objects.get_for_model() to fall back to using the ContentType manager method in event the ObjectType database table does not yet exist. (This should only ever happen during a migration to v4.4.)
  • The has_feature() utility function now support resolving feature support for ContentTypes without querying its corresponding ObjectType in the database.
*Originally created by @jeremystretch on 10/6/2025* ### Fixes: #20290 This PR is submitted as an alternative to #20473. - Hook into `ObjectType.objects.get_for_model()` to fall back to using the ContentType manager method in event the ObjectType database table does not yet exist. (This should only ever happen during a migration to v4.4.) - The `has_feature()` utility function now support resolving feature support for ContentTypes without querying its corresponding ObjectType in the database.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/netbox#1114