Commit efb6e3c
committed
fix: don't create Asset with empty hash in User.banner
The `banner` field in the Discord API `User` object is both nullable and can be missing.
When a User is fetched with `force=True` to obtain the `banner` value, due to how the data is processed, an Asset with hash=None may be erroneously created, whose url points to `None.png`.
This fix makes User correctly process the null `banner` such that User.banner would become `None` in that case, rather than `Asset(hash=None)`. The similar Member object processed `banner` correctly and is not affected by this bug.1 parent ff1f1d5 commit efb6e3c
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
171 | 171 | | |
172 | 172 | | |
173 | 173 | | |
174 | | - | |
| 174 | + | |
175 | 175 | | |
176 | 176 | | |
177 | 177 | | |
| |||
0 commit comments