﻿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
3081	[patch] Fix deleting objects with generic relation	Alex Dedul	Adrian Holovaty	"When you have generic relation in a model and you do model_obj.delete() from generic related table deleted all records with object_id = model_obj.id - that is incorrect. Correct condition for deletion should be ""object_id = model_obj.id AND content_type = content_type(model_obj)"" (in pseudo code). Also this patch fixes deletion of a model with generic foreign key(i.e. model referenced by generic relation) - current behavior is to try to delete records from m2m generic relations, but there is no m2m tables created for generic relations so there is no need to delete anything in this case - this also fixes issues mentioned in #2749 with deletion of both records. 

Attached patch fixes all these issues."	defect	closed	Database layer (models, ORM)		normal	fixed			Unreviewed	1	0	0	0	0	0
