Skip to content Skip to sidebar Skip to footer

Badrequesterror: Blob, Enity_proto Or Text Property Concise_topics Must Be In A Raw_property Field

Here is the code for my model. from google.appengine.ext import ndb from modules.admin.models.Author import Author from modules.hod.models.Concept import Concept class Post(ndb.

Solution 1:

I would use _pre_put_hook instead of ComputedProperty

topics = ndb.StructuredProperty(Concept, repeated=True)
concise_topics = ndb.StructuredProperty(Concept, repeated=True)

def_pre_put_hook(self):
    self.concise_topics = filter(lambda x: x.occurrences > 1, self.topics)

Solution 2:

We could return the Concept from get_important_topics. For example, if the Concept has field topics, it could be like:-

defget_important_topics(self):
    return Concept(topics=filter(lambda x: x.occurrences > 1, self.topics))

Post a Comment for "Badrequesterror: Blob, Enity_proto Or Text Property Concise_topics Must Be In A Raw_property Field"