Commit a3c67b8
fix: dedupe command FieldError with only("id") and select_related (#14350)
Using findings.only("id") while select_related traversal was still
active on the queryset caused a FieldError. Clear both select_related
and prefetch_related before calling only("id") so the async dispatch
path works regardless of how the queryset was constructed.
Also switch --dedupe_batch_mode from store_true to BooleanOptionalAction
so the flag can be explicitly disabled with --no-dedupe_batch_mode.
Co-authored-by: Ross E Esposito <ross@defectdojo.com>1 parent 9147099 commit a3c67b8
1 file changed
Lines changed: 5 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | 3 | | |
3 | 4 | | |
| |||
53 | 54 | | |
54 | 55 | | |
55 | 56 | | |
56 | | - | |
| 57 | + | |
57 | 58 | | |
58 | 59 | | |
59 | 60 | | |
| |||
130 | 131 | | |
131 | 132 | | |
132 | 133 | | |
133 | | - | |
| 134 | + | |
| 135 | + | |
134 | 136 | | |
135 | 137 | | |
136 | 138 | | |
137 | 139 | | |
138 | | - | |
| 140 | + | |
139 | 141 | | |
140 | 142 | | |
141 | 143 | | |
| |||
0 commit comments