From dc604949ad51c1657fb4c416f6f3807b44b729c5 Mon Sep 17 00:00:00 2001 From: Daniel Grams Date: Mon, 17 Apr 2023 08:53:53 +0200 Subject: [PATCH] Library updates #432 --- migrations/env.py | 7 +------ project/api/schemas.py | 6 +++--- project/static/site.js | 2 +- 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/migrations/env.py b/migrations/env.py index e6176de..2615d73 100644 --- a/migrations/env.py +++ b/migrations/env.py @@ -15,12 +15,7 @@ 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 + return current_app.extensions["migrate"].db.engine def get_engine_url(): diff --git a/project/api/schemas.py b/project/api/schemas.py index 49ddaf3..8766984 100644 --- a/project/api/schemas.py +++ b/project/api/schemas.py @@ -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): diff --git a/project/static/site.js b/project/static/site.js index 8a0abe6..06ee2e7 100644 --- a/project/static/site.js +++ b/project/static/site.js @@ -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)