We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent da64c56 commit bc26529Copy full SHA for bc26529
netbox/netbox/models/features.py
@@ -288,12 +288,13 @@ def clean(self):
288
cf.name: cf for cf in CustomField.objects.get_for_model(self)
289
}
290
291
+ # Remove any stale custom field data
292
+ self.custom_field_data = {
293
+ k: v for k, v in self.custom_field_data.items() if k in custom_fields.keys()
294
+ }
295
+
296
# Validate all field values
297
for field_name, value in self.custom_field_data.items():
- if field_name not in custom_fields:
- raise ValidationError(_("Unknown field name '{name}' in custom field data.").format(
- name=field_name
- ))
298
try:
299
custom_fields[field_name].validate(value)
300
except ValidationError as e:
0 commit comments