﻿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
13372	Field instance copying failes before contribute_to_class	paluh	nobody	"Python copy.copy() called on Field instance which is not contributed to class (before contribute_to_class call) raises:
{{{
AttributeError: 'SomeField' object has no attribute 'model'
}}}
This issue is related to #12977 changeset. It has added db.models.Field.!__setstate!__ method which expects that Field instance has 'model' attribute (but it is initialised in contribute_to_class method). I think that copying of instance should be safe all the time and this problem can be easily fixed by 'hasattr' check. Should I provide patch with test?
"		closed	Uncategorized	dev		duplicate			Unreviewed	0	0	0	0	0	0
