Hi there,
I tried to auto update a timestamp on a EmbeddedDocument, but when calling save() on the EmbeddedDocument document, the signals receive an instance of the parent document...
Is this a bug or I am doing something wrong ?
class Item(db.EmbeddedDocument):
url = db.StringField(primary_key=True)
title = db.StringField()
modified = db.DateTimeField()
class Search(db.Document):
name = db.StringField(required=True)
items = db.EmbeddedDocumentListField(Item)
def update_modified(sender, document):
logging.warning(sender)
logging.warning(document)
signals.pre_save.connect(update_modified)