Commit 34d37db
committed
Render right_page onboarding template correctly
Currently, the template_content.py DeviceContent class returns `None`
if onboarding is not enabled for an OnboardingDevice object. Likewise,
if no OnboardingDevice object exists, the template continues trying to
access attributes for an OnboardingDevice object. In the first case,
template rendering will fail as an empty string is needed in order
to insert nothing into the rendered HTML template presented to the user.
In the second case, an AttributeError is raised as you can not access
attributes of a NoneType object.1 parent 5865734 commit 34d37db
1 file changed
+4
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
28 | 31 | | |
29 | | - | |
| 32 | + | |
30 | 33 | | |
31 | 34 | | |
32 | 35 | | |
| |||
0 commit comments