I would solve this problem using the mapreduce library .
First register the display device in mapreduce.yaml:
mapreduce:
- name: fixing required property
mapper:
input_reader: mapreduce.input_readers.DatastoreInputReader
handler: your handler
params:
- name: entity_kind
default: main.ModelV2
then define a function processto modify the entities:
from mapreduce import operation as op
def process(entity):
if not entity.newproperty :
entity.newproperty = None
yield op.db.Put(entity)
, mapreduce - :
entities = ModelV2.all()
for entity in entities :
if not entity.newproperty :
entity.newproperty = None
entity.put()