1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Fixes #7808: Fix reference values for content type under custom field import form

This commit is contained in:
jeremystretch
2021-11-11 16:21:27 -05:00
parent 0b705553a5
commit 9f8068e8d1
2 changed files with 2 additions and 1 deletions

View File

@ -304,7 +304,7 @@ class CSVMultipleContentTypeField(forms.ModelMultipleChoiceField):
app_label, model = name.split('.')
ct_filter |= Q(app_label=app_label, model=model)
return list(ContentType.objects.filter(ct_filter).values_list('pk', flat=True))
return super().prepare_value(value)
return f'{value.app_label}.{value.model}'
#