Commit e17ea57
authored
Verified in all fields whether reserved field names are used (#992)
In meta class only specifically declared fields in serializer are accessible.
In case of `ModelSerializer` fields may be just on the model or
if a user has overwritten what fields are being returned during runtime
DJA won't notice. So there does not seem to be another way then simply hooking
into the `get_fields` method to check for reserved field names.1 parent ee679ee commit e17ea57
File tree
2 files changed
+26
-19
lines changed- rest_framework_json_api
- tests
2 files changed
+26
-19
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
156 | 177 | | |
157 | 178 | | |
158 | 179 | | |
| |||
184 | 205 | | |
185 | 206 | | |
186 | 207 | | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | 208 | | |
207 | 209 | | |
208 | 210 | | |
| |||
228 | 230 | | |
229 | 231 | | |
230 | 232 | | |
| 233 | + | |
231 | 234 | | |
232 | 235 | | |
233 | 236 | | |
| |||
251 | 254 | | |
252 | 255 | | |
253 | 256 | | |
| 257 | + | |
254 | 258 | | |
255 | 259 | | |
256 | 260 | | |
| |||
271 | 275 | | |
272 | 276 | | |
273 | 277 | | |
| 278 | + | |
274 | 279 | | |
275 | 280 | | |
276 | 281 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| 46 | + | |
| 47 | + | |
46 | 48 | | |
47 | 49 | | |
48 | 50 | | |
| |||
0 commit comments