Can't instantiate mongo EmbeddedDocumentField with a string argument, only works with object.
rochacbruno opened this issue · 0 comments
rochacbruno commented
If I do:
comments = db.ListField(db.EmbeddedDocumentField(Comment))
everything works ok.
But it does not works if I do;
comments = db.ListField(db.EmbeddedDocumentField("Comment"))
It says:
str object does not have attribute __base__ cls.__base__
I guess it needs to be imported dinamically by the string name of the model.