@@ -81,7 +81,7 @@ def home(page, auth_dict=None):
81
81
db_files = File .query .offset ((page - 1 ) * 10 ).limit (10 ).all ()
82
82
harolds = get_harold_list (auth_dict ["uid" ])
83
83
tour_harolds = get_harold_list ("root" )
84
-
84
+
85
85
is_rtp = ldap_is_rtp (auth_dict ["uid" ])
86
86
is_eboard = ldap_is_eboard (auth_dict ["uid" ])
87
87
@@ -144,7 +144,7 @@ def selected(page, auth_dict=None):
144
144
145
145
is_rtp = ldap_is_rtp (auth_dict ["uid" ])
146
146
is_eboard = ldap_is_eboard (auth_dict ["uid" ])
147
-
147
+
148
148
tour_harolds = get_harold_list ("root" )
149
149
db_files = query .offset ((page - 1 ) * 10 ).limit (10 ).all ()
150
150
return render_template ("main.html" , db_files = db_files ,
@@ -164,18 +164,19 @@ def admin_def(auth_dict=None):
164
164
@auth .oidc_auth ('default' )
165
165
@audiophiler_auth
166
166
def admin (page , auth_dict = None ):
167
+ tour_harolds = get_harold_list ("root" )
167
168
query = File .query .filter (File .file_hash .in_ (tour_harolds ))
168
169
rows = query .count ()
170
+ rows = int (rows // 10 + bool (rows % 10 ))
169
171
170
172
if page > rows or page < 1 :
171
173
return "Page Out of Bounds" , 404
172
174
173
- rows = int (rows // 10 + bool (rows % 10 ))
174
175
is_rtp = ldap_is_rtp (auth_dict ["uid" ])
175
176
is_eboard = ldap_is_eboard (auth_dict ["uid" ])
177
+
176
178
if is_eboard or is_rtp :
177
179
harolds = get_harold_list (auth_dict ["uid" ])
178
- tour_harolds = get_harold_list ("root" )
179
180
db_files = query .offset ((page - 1 ) * 10 ).limit (10 ).all ()
180
181
return render_template ("main.html" , db_files = db_files ,
181
182
get_date_modified = get_date_modified , s3_bucket = s3_bucket ,
0 commit comments