Skip to content

Commit

Permalink
Fix list_ids not being considered in bulk list change on the UI. Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
knadh committed Mar 20, 2022
1 parent ef643a1 commit 4e6410e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions cmd/queries.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion cmd/subscribers.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
1 change: 1 addition & 0 deletions frontend/src/views/Subscribers.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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),
};
Expand Down

0 comments on commit 4e6410e

Please sign in to comment.