Invalid embedded document instance provided to an EmbeddedDocumentField on save
问题 I have these mongoengine models declared: class SyncDiscrepancy(EmbeddedDocument): upi = StringField(primary_key=True) error_code = IntField(required=True) meta = { 'indexes': ['upi', 'error_code'] } ########## END SYNC class Flight(Document): identifier = StringField(primary_key=True) env = StringField(required=True, max_length=3) peak = IntField(required=True) carrier = StringField(required=True, max_length=3) number = IntField(required=True) boardpoint = StringField(required=True) offpoint