diff --git a/backend/app/templates/mail_sources.html b/backend/app/templates/mail_sources.html index e821228..40da181 100644 --- a/backend/app/templates/mail_sources.html +++ b/backend/app/templates/mail_sources.html @@ -454,7 +454,7 @@ function mailSourcesApp() { }, async testSource(id) { - this.$set(this.testing, id, true); + this.testing[id] = true; this.feedback = { message: '', type: '' }; try { const resp = await fetch(`/api/v1/mail-sources/${id}/test`, { method: 'POST' }); @@ -474,7 +474,7 @@ function mailSourcesApp() { } catch (e) { this.feedback = { message: `Test error: ${e.message}`, type: 'error' }; } finally { - this.$set(this.testing, id, false); + this.testing[id] = false; } }, diff --git a/backend/app/tests/test_mail_sources.py b/backend/app/tests/test_mail_sources.py index 511d157..0814670 100644 --- a/backend/app/tests/test_mail_sources.py +++ b/backend/app/tests/test_mail_sources.py @@ -147,9 +147,7 @@ class TestMailSourcesAPI: db_session.add(MailSource(name="Disabled", method="IMAP", enabled=False)) db_session.commit() - enabled = ( - db_session.query(MailSource).filter(MailSource.enabled == True).all() # noqa: E712 - ) + enabled = db_session.query(MailSource).filter(MailSource.enabled).all() assert len(enabled) == 2 names = {s.name for s in enabled} assert "Enabled A" in names