Fixes #6908: Allow assignment of scope to VLAN groups upon import

This commit is contained in:
jeremystretch
2021-08-09 09:54:27 -04:00
parent 8da97f004d
commit f34638dc32
4 changed files with 18 additions and 7 deletions

View File

@@ -269,6 +269,8 @@ class CSVContentTypeField(CSVModelChoiceField):
return f'{value.app_label}.{value.model}'
def to_python(self, value):
if not value:
return None
try:
app_label, model = value.split('.')
except ValueError: