clearer .landscape.yml + change self.__class__._meta to self._meta

This commit is contained in:
Stefan Wojcik 2016-12-08 10:45:24 -05:00
parent 205a975781
commit 0189818f3e
2 changed files with 3 additions and 2 deletions

View File

@ -1,3 +1,4 @@
pylint:
disable:
- W0212
# We use this a lot (e.g. via document._meta)
- protected-access

View File

@ -362,7 +362,7 @@ class Document(BaseDocument):
else:
select_dict = {}
select_dict['_id'] = object_id
shard_key = self.__class__._meta.get('shard_key', tuple())
shard_key = self._meta.get('shard_key', tuple())
for k in shard_key:
path = self._lookup_field(k.split('.'))
actual_key = [p.db_field for p in path]