diff --git a/core/admin/mailu/internal/views/dovecot.py b/core/admin/mailu/internal/views/dovecot.py index e949e2eb..0d56950b 100644 --- a/core/admin/mailu/internal/views/dovecot.py +++ b/core/admin/mailu/internal/views/dovecot.py @@ -33,7 +33,7 @@ def dovecot_quota(ns, user_email): user = models.User.query.get(user_email) or flask.abort(404) if ns == "storage": user.quota_bytes_used = flask.request.get_json() - user.flag_updated_at_as_modified() + user.dont_change_updated_at() models.db.session.commit() return flask.jsonify(None) diff --git a/core/admin/mailu/models.py b/core/admin/mailu/models.py index edcdcf27..0071bc77 100644 --- a/core/admin/mailu/models.py +++ b/core/admin/mailu/models.py @@ -155,7 +155,7 @@ class Base(db.Model): self.__hashed = id(self) if primary is None else hash(primary) return self.__hashed - def flag_updated_at_as_modified(self): + def dont_change_updated_at(self): """ Mark updated_at as modified, but keep the old date when updating the model""" flag_modified(self, 'updated_at')