From 96d643548e7c161590b66ef893eafde5f7f35bcc Mon Sep 17 00:00:00 2001 From: Malcolm Tredinnick Date: Wed, 16 Apr 2008 02:58:45 +0000 Subject: [PATCH] queryset-refactor: Added some missed quoting to a table name. (Noticed in passing in the patch on #6596). Refs #6596. git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@7428 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/db/models/sql/subqueries.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django/db/models/sql/subqueries.py b/django/db/models/sql/subqueries.py index 6b3ef5ae40..9b5b9ba0f6 100644 --- a/django/db/models/sql/subqueries.py +++ b/django/db/models/sql/subqueries.py @@ -24,7 +24,7 @@ class DeleteQuery(Query): """ assert len(self.tables) == 1, \ "Can only delete from one table at a time." - result = ['DELETE FROM %s' % self.tables[0]] + result = ['DELETE FROM %s' % self.quote_name_unless_alias(self.tables[0])] where, params = self.where.as_sql() result.append('WHERE %s' % where) return ' '.join(result), tuple(params)