Skip to content

Commit 511a427

Browse files
author
micahhausler
committed
Fix for when a list is returned
1 parent 010fa37 commit 511a427

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)