Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google App Engine datastore 'distinct' not working in dev server or production

Following code runs fine on production and dev server:

outstanding_qs = models.SitePerformanceTrackingAnswers.all().run(projection=('questionnaire',))

However, after adding the distinct parameter when calling run (as should be possible according to the documentation):

outstanding_qs = models.SitePerformanceTrackingAnswers.all().run(projection=('questionnaire',), distinct=True)

The following error is generated on both dev and production:

TypeError: Unknown configuration option ('distinct')

What am I doing wrong!?

like image 901
HorseloverFat Avatar asked Jan 18 '26 17:01

HorseloverFat


1 Answers

Seems like it's a bug. You can pass the query options to .all() though, to do the same thing. (And checking, this seems not to be documented... I'm fairly sure it works though)

like image 158
Greg Avatar answered Jan 21 '26 00:01

Greg