Commit 52cf3ee
authored
Fix AttributeError when build.version is None in telemetry collection (#12572)
## Summary
Fixes an AttributeError that occurs when collecting telemetry data for
builds where the version has been deleted.
## Details
The `Build.version` field is nullable (`null=True`,
`on_delete=models.SET_NULL`), which means it can be `None` when a
version is deleted. The telemetry data collection code was attempting to
access `build.version.id` without checking for `None`, causing an
AttributeError.
## Fixes
https://read-the-docs.sentry.io/issues/6296397769/1 parent d8e8215 commit 52cf3ee
1 file changed
+5
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
100 | 101 | | |
101 | 102 | | |
102 | 103 | | |
| |||
0 commit comments