There was an error while loading. Please reload this page.
2 parents 94072e0 + 2f0a0df commit bf4a0caCopy full SHA for bf4a0ca
1 file changed
src/netbox_initializers/initializers/base.py
@@ -52,7 +52,7 @@ def set_custom_fields_values(self, entity, custom_field_data):
52
missing_cfs.append(key)
53
else:
54
ct = ObjectType.objects.get_for_model(entity)
55
- if ct not in cf.object_types.all():
+ if not cf.object_types.filter(pk=ct.pk).exists():
56
print(
57
f"⚠️ Custom field {key} is not enabled for {entity}'s model!"
58
"Please check the 'on_objects' for that custom field in custom_fields.yml"
0 commit comments