0
votes

I can't del on ComputedProperty.

If i remove the property in the model, then, when i get a result i can see the last value.

dbExamCorrection(key=Key('dbExamCorrection', 4519216128458752), aid=6744627663077376, c=0, ca=0, correct=5, created=datetime.datetime(2016, 1, 26, 11, 40, 10, 35968), dm=0, feedback=None, ga=0, gv=0, ic=0, l=0, o=0, p=0, percent1=83.33333333333333, percent2=0.0, percent3=0.0, percent=None, questions=6, score=None, sum2=0L, sum=0L, tid=0, updated=datetime.datetime(2016, 1, 27, 7, 43, 47, 951561))

But if i access the value, raises:

'dbExamCorrection' object has no attribute 'percent1'

I don't want to store obsolete information in the model.

Thanks in advance.

1

1 Answers

0
votes

One approach is outlined here - Migrating data when changing an NDB field's property type

Basically fetch the underlying entity (without using ndb) - you get a dictionary and then delete the key/value and then save the entity.

If you have less than say 50,000 entities it's probably easier doing this via the remote api, as it means you can do this without deploying new code.