Fixed slice when using inheritance causing fields to be excluded (#437)

This commit is contained in:
Ross Lawley 2013-08-20 09:14:58 +00:00
parent ee7666ddea
commit 67baf465f4
2 changed files with 3 additions and 1 deletions

View File

@ -4,6 +4,7 @@ Changelog
Changes in 0.8.4
================
- Fixed slice when using inheritance causing fields to be excluded (#437)
- Fixed ._get_db() attribute after a Document.switch_db() (#441)
- Dynamic Fields store and recompose Embedded Documents / Documents correctly (#449)
- Handle dynamic fieldnames that look like digits (#434)

View File

@ -55,6 +55,7 @@ class QueryFieldList(object):
if self.always_include:
if self.value is self.ONLY and self.fields:
if sorted(self.slice.keys()) != sorted(self.fields):
self.fields = self.fields.union(self.always_include)
else:
self.fields -= self.always_include