Skip to content

Commit 9f8068e

Browse files
committed
Fixes #7808: Fix reference values for content type under custom field import form
1 parent 0b70555 commit 9f8068e

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

docs/release-notes/version-3.0.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
* [#7788](https://github.com/netbox-community/netbox/issues/7788) - Improve XSS mitigation in Markdown renderer
2121
* [#7791](https://github.com/netbox-community/netbox/issues/7791) - Enable sorting device bays table by installed device status
2222
* [#7802](https://github.com/netbox-community/netbox/issues/7802) - Differentiate ID and VID columns in VLANs table
23+
* [#7808](https://github.com/netbox-community/netbox/issues/7808) - Fix reference values for content type under custom field import form
2324
* [#7809](https://github.com/netbox-community/netbox/issues/7809) - Add missing export template support for various models
2425

2526
---

netbox/utilities/forms/fields.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ def prepare_value(self, value):
304304
app_label, model = name.split('.')
305305
ct_filter |= Q(app_label=app_label, model=model)
306306
return list(ContentType.objects.filter(ct_filter).values_list('pk', flat=True))
307-
return super().prepare_value(value)
307+
return f'{value.app_label}.{value.model}'
308308

309309

310310
#

0 commit comments

Comments
 (0)