[patch] Fix set fields defaults in admin forms on adding from GET params
|Reported by:||plisk||Owned by:||Adrian Holovaty|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
Because of request.GET is an QueryDict object it returns list even for param with only 1 value, like if you pass to your add form ...my_object/add/?name=Foo you'll see Foo? in the Name field. This patch fixes this behaviour to correctly set fields defaults so Foo is Foo, not Foo? on the forms. Preselect of fields with ForeignKey should also start to work.