alltyme / appengine-ndb-experiment

Automatically exported from code.google.com/p/appengine-ndb-experiment
Other
0 stars 0 forks source link

Repeated LocalStructuredProperty fails when Nones inserted #233

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

from google.appengine.ext import ndb

class Nested(ndb.Model):
  pass

class Test(ndb.Model):
  foos = ndb.LocalStructuredProperty(Nested, repeated=True)

t = Test()
t.foos.append(None)
t.put()

What is the expected output? What do you see instead?

This code crashes in LocalStructuredProperty._prepare_for_put.  The None should 
either be caught by validation, or _prepare_for_put should check if subent is 
None.

What version of the product are you using? On what operating system?
1.7.4 on OS X

Original issue reported on code.google.com by pi...@knowlabs.com on 8 Jan 2013 at 7:52

GoogleCodeExporter commented 9 years ago

Original comment by pcoste...@google.com on 12 Nov 2013 at 4:48

GoogleCodeExporter commented 9 years ago
Fixed in ndb release 1.0.10 (SDK release 1.8.9).

Original comment by pcoste...@google.com on 11 Jan 2014 at 11:51