fix BaseQueryWrapper.first()

This commit is contained in:
Laura Klünder 2017-07-27 14:06:46 +02:00
parent 6c33a8a41b
commit 4fd1968ff7

View file

@ -673,6 +673,8 @@ class BaseQueryWrapper(BaseWrapper):
@get_queryset
def first(self):
if self._created_pks:
return next(self._get_created_objects())
first = self._obj.first()
if first is not None:
first = self._wrap_instance(first)