mirror of
https://github.com/netbox-community/netbox.git
synced 2025-09-06 14:23:36 -06:00
Handle empty object_types field in Tag bulk import
This commit is contained in:
parent
290e4afaa0
commit
8ad3eb1ca2
@ -120,4 +120,6 @@ class CSVMultipleContentTypeField(forms.ModelMultipleChoiceField):
|
|||||||
app_label, model = name.split('.')
|
app_label, model = name.split('.')
|
||||||
ct_filter |= Q(app_label=app_label, model=model)
|
ct_filter |= Q(app_label=app_label, model=model)
|
||||||
return list(ContentType.objects.filter(ct_filter).values_list('pk', flat=True))
|
return list(ContentType.objects.filter(ct_filter).values_list('pk', flat=True))
|
||||||
return object_type_identifier(value)
|
if value:
|
||||||
|
return object_type_identifier(value)
|
||||||
|
return None
|
||||||
|
Loading…
Reference in New Issue
Block a user