Don't update syntax highlighting prefs when it is disabled globally
Review Request #9796 — Created March 16, 2018 and submitted
When syntax highlighting was disabled globally, we were deleting the
form field from theAccountSettingsForm
. However, later on we were
trying to read from this field, causing an exception and the my account
page to not load.Now when syntax highlighting is disabled, we mark the field as disabled
and refuse updates to it. It will also always render as if the user had
it disabled so it does not appear in a disabled but always on state for
the user.
Ran unit tests.
The my account page no longer raises an exception.
Description | From | Last Updated |
---|---|---|
This no longer has the right saving logic. |
chipx86 | |
F821 undefined name 'new_profile' |
reviewbot | |
Missing Returns: |
david | |
Alphabetical order. |
chipx86 | |
Docstring? |
david | |
Docstring? |
david | |
Maybe a bit cleaner if we pass user into self._request and have it assign it. |
david | |
We already pull this in above. We shouldn't need to re-fetch. |
chipx86 | |
"Disabled" globally? |
chipx86 | |
So I was going to say we should combine the if statements, but really, we can just do: if not … |
chipx86 | |
Can you call this something like _build_request? Also, private methods go last. |
chipx86 | |
Typos: "through", "middleware" |
chipx86 | |
Just realized, there's no reason to do this in clean() anymore. Instead, the setting should only be conditionally saved in … |
chipx86 |
- Commit:
-
d9c5d9d83f266cc1d0fa01ad75a583159a7182909a94b4dd43f871a0c75aa21f713e6069adbf54df
Checks run (2 succeeded)
- Change Summary:
-
Addressed David's issues.
- Commit:
-
9a94b4dd43f871a0c75aa21f713e6069adbf54dfdfff73219256799995a3ee9d0208716e301097f5
Checks run (2 succeeded)
- Change Summary:
-
address issues, rebase
- Commit:
-
dfff73219256799995a3ee9d0208716e301097f52f94333af6ffa23804eee81cb9f923337d3b638f
Checks run (2 succeeded)
- Commit:
-
2f94333af6ffa23804eee81cb9f923337d3b638f7722d9ab13859229119d664e4bb8a0c07a641bf8
Checks run (2 succeeded)
- Commit:
-
7722d9ab13859229119d664e4bb8a0c07a641bf8c04d203fc4c54d730581ccad135109d8cc7642b1