Fix list_ids not being considered in bulk list change on the UI. Fixes #737.

This commit is contained in:
Kailash Nadh 2022-03-20 11:02:43 +05:30
parent ef643a14a3
commit 4e6410ec17
3 changed files with 3 additions and 1 deletions

View file

@ -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 {

View file

@ -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 {

View file

@ -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),
};