From eefc9550fd3b8011cc12069eb700df09f25cc4d9 Mon Sep 17 00:00:00 2001 From: Sergey Fedoseev Date: Sat, 9 Feb 2019 18:41:35 +0500 Subject: [PATCH] Simplified Window.as_sql(). --- django/db/models/expressions.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/django/db/models/expressions.py b/django/db/models/expressions.py index ccb9636503..6afe68bac0 100644 --- a/django/db/models/expressions.py +++ b/django/db/models/expressions.py @@ -1251,12 +1251,12 @@ class Window(Expression): if self.order_by is not None: window_sql.append(' ORDER BY ') order_sql, order_params = compiler.compile(self.order_by) - window_sql.extend(''.join(order_sql)) + window_sql.extend(order_sql) window_params.extend(order_params) if self.frame: frame_sql, frame_params = compiler.compile(self.frame) - window_sql.extend(' ' + frame_sql) + window_sql.append(' ' + frame_sql) window_params.extend(frame_params) params.extend(window_params)