discourse/app
Blake Erickson 67dec38f31 FIX: Gravatar download attempt if user is missing their email
It is possible that a user could exist without an email, if so we should
not enqueue a job to download their gravatar.

This commit resolves this error that can occur:

```
Job exception: undefined method `email' for nil:NilClass
/var/www/discourse/app/models/user.rb:1204:in `email'
/var/www/discourse/app/jobs/regular/update_gravatar.rb:12:in `execute'
```

This commit also fixes the original spec which actually was wrong. The
job never enqueued in the original spec and so the gravatar was never
actually updated and the test was checking if the two values were the
same, but they were both null and never updated, so of course they were
the same!

A new test has also been added to make sure the gravatar job isn't
enqueued when a user's email is missing.
2020-09-02 20:19:46 -06:00
..
assets UX: Hide category settings badges checkbox when enable_badges is off 2020-09-02 11:23:59 -04:00
controllers FIX: highlightjs 10 requires some languages to be loaded before others (#10584) 2020-09-02 21:32:57 +02:00
helpers FEATURE: Add site setting and wizard step to set base font (#10250) 2020-08-31 13:14:09 +03:00
jobs FIX: Gravatar download attempt if user is missing their email 2020-09-02 20:19:46 -06:00
mailers PERF: Replace video and audio links in search blurb while indexing. 2020-08-06 12:25:03 +08:00
models FIX: Gravatar download attempt if user is missing their email 2020-09-02 20:19:46 -06:00
serializers Add category id to webhook post serializer 2020-09-02 10:42:51 -04:00
services DEV: add plugin hooks for silence message parameters (#10538) 2020-09-01 17:25:24 -07:00
views DEV: Add class to wizard HTML element 2020-09-02 14:53:38 -04:00