Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/netbox_initializers/initializers/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def set_custom_fields_values(self, entity, custom_field_data):
missing_cfs.append(key)
else:
ct = ObjectType.objects.get_for_model(entity)
if ct not in cf.object_types.all():
if not cf.object_types.filter(pk=ct.pk).exists():
print(
f"⚠️ Custom field {key} is not enabled for {entity}'s model!"
"Please check the 'on_objects' for that custom field in custom_fields.yml"
Expand Down
Loading