﻿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
33451	queryset_object.query results does not add quotes around string values	Raju Kumar Singh	nobody	"// queryset
{{{
        queryset = (FormDataValues.objects
                    .filter(testing_cycle='BL')
                    .values(location_name=F(location_name))
                    )

print(queryset.query)
}}}

// result would be 

{{{
SELECT `school`.`school_name` AS `location_name` FROM `form_data_values` WHERE ( `form_data`.`testing_cycle` = BL)
}}}

The result has a small issue, look at the value (""BL"") that is being filtered, It is string so there should have been single quotes around it.

Many of occasions, I just paste the generated SQL in the MySQL editor but in order to run the whole SQL syntax I need to add quotes around the string values. This becomes a big issues with the complex sql.
"	Bug	closed	Database layer (models, ORM)	4.0	Normal	duplicate			Unreviewed	0	0	0	0	0	0
