From 883d54a428830d638e18244c205b3d87ac4b430e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 29 Mar 2026 16:20:11 +0000 Subject: [PATCH] fix: address code review - Alpine.js $set, SQLAlchemy bool filter style Agent-Logs-Url: https://github.com/christianlouis/dmarq/sessions/f141cd3b-8d0a-4c7e-b479-ee973c209c11 Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com> --- backend/app/templates/mail_sources.html | 4 ++-- backend/app/tests/test_mail_sources.py | 4 +--- 2 files changed, 3 insertions(+), 5 deletions(-) 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