Skip to content

Commit e5b019b

Browse files
committed
Cleanup, remove some ambiguous code.
1 parent be27ae6 commit e5b019b

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

django_mongodb/compiler.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ def _make_result(self, entity, columns):
7373
"""
7474
result = []
7575
for name, col in columns:
76-
field = col.field
7776
column_alias = getattr(col, "alias", None)
7877
obj = (
7978
# Use the related object...
@@ -82,8 +81,7 @@ def _make_result(self, entity, columns):
8281
if column_alias is not None and column_alias != self.collection_name
8382
else entity
8483
)
85-
value = obj.get(name, field.get_default())
86-
result.append(value)
84+
result.append(obj.get(name, col.field.get_default()))
8785
return result
8886

8987
def check_query(self):

0 commit comments

Comments
 (0)