So when switching from old to new and reverse, I can reproduce it to work and stop working.
Sadly, I was unable to find out, which project's fault is that nor to fix it.
Even checked the last commit's every and found nothing which could have done it.
Working Versions:
Flask 2.1.2
Flask-Admin: 1.6.0
flask-mongoengine 1.0.0
wtforms 3.0.1
Not working:
Flask 3.0.0
Flask-Admin 1.6.1
flask-mongoengine forkgit@master
wtforms 3.1.1
The Problem is, that the form_widget_args, form_overwrite etc. for the subdocuments are not applied,
I can even add random field names etc. without error, only on the first level I get error messages when the field is wrong.
# .-- Checkmk BI Aggregations
class BiAggregationOutcome(db.EmbeddedDocument):
"""
BI Aggregation
"""
description = db.StringField()
rule_template = db.StringField()
class CheckmkBiAggregation(db.Document):
"""
BI Aggregation
"""
name = db.StringField(required=True, unique=True)
condition_typ = db.StringField(choices=rule_types)
conditions = db.ListField(field=db.EmbeddedDocumentField(document_type="FullCondition"))
render_full_conditions = db.StringField() # Helper for Preview
outcomes = db.ListField(field=db.EmbeddedDocumentField(document_type="BiAggregationOutcome"))
render_cmk_bi_rule = db.StringField()
last_match = db.BooleanField(default=False)
enabled = db.BooleanField()
meta = {
'strict': False
}
#.
Because of the flask-mongoengine version switch, I had to change ListFields to have the field= param, and the EmbeddedDocuments to have the document_type.
Maybe this is related.
I had to Update the Flask etc. Modules in my Open-Source Project. One Problem was that I had to replace flask-mongoengine with: https://github.com/idoshr/flask-mongoengine
So when switching from old to new and reverse, I can reproduce it to work and stop working. Sadly, I was unable to find out, which project's fault is that nor to fix it. Even checked the last commit's every and found nothing which could have done it.
Working Versions: Flask 2.1.2 Flask-Admin: 1.6.0 flask-mongoengine 1.0.0 wtforms 3.0.1
Not working: Flask 3.0.0 Flask-Admin 1.6.1 flask-mongoengine forkgit@master wtforms 3.1.1
The Problem is, that the form_widget_args, form_overwrite etc. for the subdocuments are not applied, I can even add random field names etc. without error, only on the first level I get error messages when the field is wrong.
That's one example from my Code:
And that's the Model for it:
Because of the flask-mongoengine version switch, I had to change ListFields to have the field= param, and the EmbeddedDocuments to have the document_type. Maybe this is related.
Thanks for any help.