From 4e6410ec177f17e806c1225809bff20fc23718a4 Mon Sep 17 00:00:00 2001 From: Kailash Nadh Date: Sun, 20 Mar 2022 11:02:43 +0530 Subject: [PATCH] Fix list_ids not being considered in bulk list change on the UI. Fixes #737. --- cmd/queries.go | 1 + cmd/subscribers.go | 2 +- frontend/src/views/Subscribers.vue | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/cmd/queries.go b/cmd/queries.go index 9d066368f..e897fe195 100644 --- a/cmd/queries.go +++ b/cmd/queries.go @@ -158,6 +158,7 @@ func (q *Queries) execSubscriberQueryTpl(exp, tpl string, listIDs []int64, db *s if len(listIDs) == 0 { listIDs = pq.Int64Array{} } + // First argument is the boolean indicating if the query is a dry run. a := append([]interface{}{false, pq.Int64Array(listIDs)}, args...) if _, err := db.Exec(fmt.Sprintf(tpl, filterExp), a...); err != nil { diff --git a/cmd/subscribers.go b/cmd/subscribers.go index d7bb4ec30..99916add5 100644 --- a/cmd/subscribers.go +++ b/cmd/subscribers.go @@ -455,7 +455,7 @@ func handleManageSubscriberLists(c echo.Context) error { IDs pq.Int64Array ) - // Is it a /:id call? + // Is it an /:id call? if pID != "" { id, _ := strconv.ParseInt(pID, 10, 64) if id < 1 { diff --git a/frontend/src/views/Subscribers.vue b/frontend/src/views/Subscribers.vue index dfb6bf1d0..bd8fa82ed 100644 --- a/frontend/src/views/Subscribers.vue +++ b/frontend/src/views/Subscribers.vue @@ -454,6 +454,7 @@ export default Vue.extend({ const data = { action, query: this.fullQueryExp, + list_ids: this.queryParams.listID ? [this.queryParams.listID] : null, target_list_ids: lists.map((l) => l.id), };