Commit e2c3f4d
Don't leak overwrite kwarg into plugin validated_data
The overwrite field on NoArtifactContentSerializer was declared with
default=True, which causes DRF to inject overwrite=True into
validated_data even when the caller omits it. This broke plugins that
splat **validated_data into a content model constructor (e.g. pulp_deb
sync), producing:
TypeError: Package() got unexpected keyword arguments: 'overwrite'
Drop the field-level default and rely on the existing
validated_data.pop('overwrite', True) in create() to preserve the
'absent => True' semantics. No behavior change for API callers.
AI-Generated: github-copilot1 parent d33e8a8 commit e2c3f4d
2 files changed
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
39 | 38 | | |
40 | 39 | | |
41 | 40 | | |
| |||
0 commit comments