﻿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
31474	QuerySet.Delete - inconsistent result when zero objects deleted	Adi Gabaie	Hasan Ramezani	"The result format of the QuerySet.Delete method is a tuple: (X, Y) 
X - is the total amount of deleted objects (including foreign key deleted objects)
Y - is a dictionary specifying counters of deleted objects for each specific model (the key is the _meta.label of the model and the value is counter of deleted objects of this model).

Example: <class 'tuple'>: (2, {'my_app.FileAccess': 1, 'my_app.File': 1})

When there are zero objects to delete in total - the result is inconsistent:
- For models with foreign keys - the result will be: <class 'tuple'>: (0, {})
- For ""simple"" models without foreign key - the result will be: <class 'tuple'>: (0, {'my_app.BlockLibrary': 0})

I would expect there will be no difference between the two cases: Either both will have the empty dictionary OR both will have dictionary with model-label keys and zero value."	Cleanup/optimization	closed	Database layer (models, ORM)	2.2	Normal	fixed	querySet Delete counter		Accepted	1	0	0	0	1	0
