diff options
author | Struan Donald <struan@exo.org.uk> | 2020-09-29 09:55:24 +0100 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2020-09-30 09:40:13 +0100 |
commit | b6fb09db4ff31aba28833b9e735e6c92ce9081c7 (patch) | |
tree | 5241e16f9a26c0743ea466da7add9810cf42da12 /web | |
parent | f63e2feb37cc9b1e5aca60d85be166fa84eb5f9f (diff) |
do not trigger duplicate check with stopper check
The stopper checking code is triggered using the category_change event
which, by default also calls the duplicate check code. This meant that
when an extra question dropdown with an associated stopper was updated
the duplicate check re-ran and the duplicate reports panel was re-shown.
The invocation of category_change on the extra questions now includes
the skip_duplicates parameter to avoid this.
Fixes mysociety/fixmystreet-commercial#2007
Diffstat (limited to 'web')
-rw-r--r-- | web/cobrands/fixmystreet/fixmystreet.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/web/cobrands/fixmystreet/fixmystreet.js b/web/cobrands/fixmystreet/fixmystreet.js index 5485ff7c7..9161282f3 100644 --- a/web/cobrands/fixmystreet/fixmystreet.js +++ b/web/cobrands/fixmystreet/fixmystreet.js @@ -470,7 +470,7 @@ $.extend(fixmystreet.set_up, { $.each(data.disable_form.questions, function(_, question) { if (question.message && question.code) { $('#form_' + question.code).on('change.category', function() { - $(fixmystreet).trigger('report_new:category_change'); + $(fixmystreet).trigger('report_new:category_change', { skip_duplicates: true } ); }); } }); |