From f9e704942456b2e9f9fd4a93fd7b292b4edaa791 Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Tue, 29 Dec 2020 16:06:43 -0800 Subject: [PATCH] Change allowed_orderby_columns from list to set; alphabetize. --- etiquette/constants.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/etiquette/constants.py b/etiquette/constants.py index 6bf3ee8..c09cab0 100644 --- a/etiquette/constants.py +++ b/etiquette/constants.py @@ -193,19 +193,19 @@ COMMIT; SQL_COLUMNS = sqlhelpers.extract_table_column_map(DB_INIT) SQL_INDEX = sqlhelpers.reverse_table_column_map(SQL_COLUMNS) -ALLOWED_ORDERBY_COLUMNS = [ - 'extension', - 'bitrate', - 'width', - 'height', - 'ratio', +ALLOWED_ORDERBY_COLUMNS = { 'area', - 'duration', + 'bitrate', 'bytes', 'created', - 'tagged_at', + 'duration', + 'extension', + 'height', 'random', -] + 'ratio', + 'tagged_at', + 'width', +} # Errors and warnings ##############################################################################