Library updates #432

This commit is contained in:
Daniel Grams 2023-04-17 08:53:53 +02:00
parent 45e6334076
commit dc604949ad
3 changed files with 5 additions and 10 deletions

View File

@ -15,11 +15,6 @@ logger = logging.getLogger("alembic.env")
def get_engine():
try:
# this works with Flask-SQLAlchemy<3 and Alchemical
return current_app.extensions["migrate"].db.get_engine()
except TypeError:
# this works with Flask-SQLAlchemy>=3
return current_app.extensions["migrate"].db.engine

View File

@ -11,11 +11,11 @@ class SQLAlchemyBaseSchema(marshmallow.SQLAlchemySchema):
def make_post_schema(self):
for name, field in self.fields.items():
if not field.required:
if field.missing is missing:
if field.load_default is missing:
if isinstance(field, fields.List):
field.missing = list()
field.load_default = list()
else:
field.missing = None
field.load_default = None
field.allow_none = True
def make_patch_schema(self):

View File

@ -156,7 +156,7 @@ function start_datepicker(input) {
$(document).find(data_allday_attr).on('change', function() {
$("#" + hidden_field_id + "-time").toggle(!this.checked);
if (data_range_to_attr) {
$(data_range_to_attr + "-time").toggle(!this.checked);
$(document).find(data_range_to_attr + "-time").toggle(!this.checked);
}
onAlldayChecked(this, hidden_field_id)