﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
7506	Unable to pickle certain QuerySet objects due to use of curry function in RelatedField	Michael Malone	Jacob	"QuerySet objects containing Model objects that have a RelatedField attribute are not pickle-able due to the use of the curry function in RelatedField. The Python pickle/cPickle modules can only serialize objects that are defined at the top level of a module. Since the curry function returns a nested function, pickling fails.

In this case, the use of curry to create a partial function seems unnecessary. Equivalent functionality can be achieved by storing the curry parameters in an instance variable. This appears to be the simplest fix to this problem, so it's probably the right one. I've attached a diff for related.py that implements this fix. Alternatively, re-implementing the curry function as a callable class may work, but not without some trickery in getstate to get the callable to pickle."		closed	Database layer (models, ORM)	1.1-beta		fixed	QuerySet pickle curry	justinarthur@…	Accepted	0	0	0	0	0	0
