discourse/spec
Alan Guo Xiang Tan 62c6ee0de7
FIX: Query syntax error in UserBadge.update_featured_ranks! (#30979)
This commit fixes an SQL syntax error in
`UserBadge.update_featured_ranks!` when
the `user_ids` param is an empty array `[]`.

This was causing the `Jobs::BackfillBadge` job to raise the following
exceptions:

```
Job exception: ERROR:  syntax error at or near ")"
LINE 6:   AND user_id IN ()
```

This commit fixes the same error in
`UserState.update_distinct_badge_count` as well

Follow-up to 3e4eac0fed
2025-01-24 14:06:39 +08:00
..
fabricators FEATURE: Improve wizard quality and rearrange steps (#30055) 2025-01-02 09:28:23 +10:00
fixtures FIX: S3Inventory#backfill_etags_and_list_missing need to unescape key (#30787) 2025-01-15 14:52:49 +08:00
generator DEV: Silence the output of migration specs (#26365) 2024-03-26 11:32:44 +01:00
helpers DEV: Backend support for light/dark mode in color palettes (#30893) 2025-01-23 15:54:49 +03:00
import_export DEV: Allow fab! without block (#24314) 2023-11-09 16:47:59 -06:00
initializers DEV: Allow fab! without block (#24314) 2023-11-09 16:47:59 -06:00
integration SECURITY: When enabled only allow Discourse Connect logins 2024-12-19 13:13:23 -03:00
integrity DEV: Add spec to ensure app works with multiple tagged loggers 2024-08-13 18:10:03 +02:00
jobs UX: Remove loading="lazy" from avatars for improved UX (#30897) 2025-01-21 14:06:45 +00:00
lib FIX: truncate extremely long site name titles (#30977) 2025-01-24 15:47:05 +11:00
mailers FEATURE: add support for One-Click unsubscribe (RFC 8058) 2024-12-31 15:28:59 +01:00
migrations DEV: update fa6 icons to drop fa prefix (#30100) 2024-12-05 10:00:41 +08:00
models FIX: Query syntax error in UserBadge.update_featured_ranks! (#30979) 2025-01-24 14:06:39 +08:00
multisite FIX: Include original filename in s3 uploads even if not attachment (#30789) 2025-01-15 18:08:18 +08:00
requests FEATURE: Allow setting locale from 'lang' param (#30952) 2025-01-24 11:53:13 +08:00
script/import_scripts DEV: Catch missing translations during test runs (#26258) 2024-05-24 22:15:53 +08:00
serializers FEATURE: Add attribution to staff notice and rename functionality (#30920) 2025-01-24 09:29:22 +10:00
services PERF: Enqueue Job::BackfillBadge in Jobs::BadgeGrant (#30945) 2025-01-24 09:35:01 +08:00
support DEV: Remove invalid parsing options (#30545) 2025-01-03 13:17:49 +01:00
system UX: Improvements to posts route (#30968) 2025-01-23 19:04:43 -08:00
tasks DEV: Fix constant redefinition warnings when running specs (#29837) 2024-11-20 15:17:36 +11:00
views FEATURE: Simplify crawler content for non-canonical post URLs (#26324) 2024-03-26 15:18:46 +00:00
rails_helper.rb DEV: Add base admin page page object (#30814) 2025-01-16 12:52:41 +08:00
regenerate_swagger_docs
swagger_helper.rb DEV: Bump rswag-specs from 2.11.0 to 2.13.0 (#24654) 2023-12-07 08:16:47 +08:00