diff --git a/datatableview/datatables.py b/datatableview/datatables.py
index <HASH>..<HASH> 100644
--- a/datatableview/datatables.py
+++ b/datatableview/datatables.py
@@ -297,8 +297,6 @@ class Datatable(six.with_metaclass(DatatableMetaclass)):
 
     def normalize_config_ordering(self, config, query_config):
         default_ordering = config['ordering']
-        ordering = []
-        columns_list = list(self.columns.values())
 
         sort_declarations = [k for k in query_config if re.match(r'^order\[\d+\]\[column\]$', k)]
 
@@ -306,6 +304,9 @@ class Datatable(six.with_metaclass(DatatableMetaclass)):
         if len(sort_declarations) == 0:
             return default_ordering
 
+        ordering = []
+        columns_list = list(self.columns.values())
+
         for sort_queue_i in range(len(columns_list)):
             try:
                 column_index = int(query_config.get(OPTION_NAME_MAP['sort_column'] % sort_queue_i, ''))
Misc: organization

These aren't used until after we decide that there is sorting to be
done.