dhsiao
dhsiao

Reputation: 3

BadValueError: Expected list or tuple, got None

I'm trying to clear out an ndb.StringProperty(repeated=True) value by setting it to None but am getting the error:

BadValueError: Expected list or tuple, got None

It's pretty straightforward, but the code I'm using is:

g.kids_names = None
g.put()

Upvotes: 0

Views: 2186

Answers (1)

GAEfan
GAEfan

Reputation: 11360

It is a repeated property. Try setting it to an empty list: []

Upvotes: 5

Related Questions