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 48ca5d4 commit f5d6f5dCopy full SHA for f5d6f5d
netbox/extras/models/customfields.py
@@ -294,8 +294,7 @@ def remove_stale_data(self, content_types):
294
no longer assigned to a model, or because it has been deleted).
295
"""
296
for ct in content_types:
297
- model = ct.model_class()
298
- if model:
+ if model := ct.model_class():
299
instances = model.objects.filter(custom_field_data__has_key=self.name)
300
for instance in instances:
301
del instance.custom_field_data[self.name]
0 commit comments