Advertisement
Guest User

Untitled

a guest
Sep 28th, 2016
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. --- a/static/admin/lotteries/script.js
  2. +++ b/static/admin/lotteries/script.js
  3. @@ -229,7 +229,11 @@
  4. var patternWinAmounts = [];
  5.  
  6. pattern_win_amount.each(function () {
  7. - patternWinAmounts.push($(this).val());
  8. + if ($(this).val()) {
  9. + patternWinAmounts.push($(this).val());
  10. + } else {
  11. + patternWinAmounts.push(0);
  12. + }
  13. });
  14.  
  15. $('.pattern-win-amount-field').val(JSON.stringify(patternWinAmounts));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement