Opened 9 years ago

Closed 9 years ago

#24771 closed Cleanup/optimization (fixed)

Simplify ModelForm._post_clean()

Reported by: Peter Schmidt Owned by: nobody
Component: Forms Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


PR I would like to see merged to master. And possibly stable/1.8.x but not needed if it might possibly trigger other issues, I'm not sure what the risk appetite is.


Originally this started out as an attempt to fix a regression under Django 1.8 with the new test on this branch:

But it turned out that test is hard to justify (basically trying to force the form and model definitions apart when the Django way is to keep them in sync as much as possible) and hard to fix (triggers 9 or so other errors on stable/1.8.x alone), so I now believe it better to roll forward.

Change History (4)

comment:1 by Peter Schmidt, 9 years ago

Component: UncategorizedForms

comment:2 by Tim Graham, 9 years ago

Has patch: set
Triage Stage: UnreviewedReady for checkin
Type: UncategorizedCleanup/optimization

It seems the simplification is okay as of 5e2c4a4bd1f86962842783e0b42ada7b9c14c247.

comment:3 by Tim Graham, 9 years ago

Summary: Refactoring modelform _post_cleanSimplify ModelForm._post_clean()

comment:4 by Tim Graham <timograham@…>, 9 years ago

Resolution: fixed
Status: newclosed

In 681df1a:

Fixed #24771 -- Simplified ModelForm._post_clean()

This code added in 45e049937d2564d11035827ca9a9221b86215e45
is no longer necessary to pass the model_formsets_regress tests
as of 5e2c4a4bd1f86962842783e0b42ada7b9c14c247.

Note: See TracTickets for help on using tickets.
Back to Top