Skip to content

Commit c3f38ed

Browse files
committed
Merge pull request jimfunk#29 from micahhausler/buggix/django-admin-save
Fix for when a list is returned
2 parents 010fa37 + 511a427 commit c3f38ed

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

netfields/fields.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ def to_python(self, value):
2828
def get_prep_lookup(self, lookup_type, value):
2929
if not value:
3030
return None
31+
if type(value) is list and len(value) == 1:
32+
value = value[0]
3133

3234
if (lookup_type in NET_OPERATORS and
3335
NET_OPERATORS[lookup_type] not in NET_TEXT_OPERATORS):

0 commit comments

Comments
 (0)