Skip to content

count() fails if order_by present in a query #447

@przemekpastuszka

Description

@przemekpastuszka

Environment details

Both AppEngine Standard python 2.7 and local dev_appserver (Google Cloud SDK 292.0.0)
python-ndb==1.2.1

Steps to reproduce

  1. Create a query where you specify order_by. In my case: Query(kind='BaseTaskTemplate', filters=OR(FilterNode('ownerGroup', '=', u'E2E'), FilterNode('isPublic', '=', True)), order_by=[PropertyOrder(name='namespace', reverse=False), PropertyOrder(name='name', reverse=False)])
  2. observe .fetch() works as expected
  3. .count() fails with ValueError('Value protobuf did not have any value set',)
  4. If you remove order_by from query, the count works.

Metadata

Metadata

Assignees

Labels

priority: p2Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions