Skip to content

Commit

Permalink
Fix web gui crash in view values, minor changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
DraTeots committed Jan 14, 2025
1 parent cca08b3 commit 5c70559
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion python/daq/update_coda.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def update_coda_conditions(context, parse_result):

# Run! Run Lu.. I mean, run number is the major thing, starting with it
if parse_result.run_number is None:
log.warn("parse_result.run_number is None. (!) Run. Number. Is. None!!!")
log.warning("parse_result.run_number is None. (!) Run. Number. Is. None!!!")
return

if context.reason == UpdateReasons.END and not db.get_run(parse_result.run_number):
Expand Down
13 changes: 10 additions & 3 deletions rcdb_web/select_values/veiws.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from flask import Blueprint, request, render_template, flash, g, redirect, url_for
from rcdb.model import ConditionType, RunPeriod
from rcdb.model import ConditionType, RunPeriod, RCDB_MAX_RUN
from runs.views import _parse_run_range

mod = Blueprint('select_values', __name__, url_prefix='/select_values')
Expand Down Expand Up @@ -27,9 +27,16 @@ def index():

run_from, run_to = _parse_run_range(run_range)

# If run_to is none, this means that it is infinite
if run_to is None:
run_to = RCDB_MAX_RUN

try:
table = g.tdb.select_values(val_names=req_conditions_values, search_str=search_query, run_min=run_from,
run_max=run_to, sort_desc=True)
table = g.tdb.select_values(val_names=req_conditions_values,
search_str=search_query,
run_min=run_from,
run_max=run_to,
sort_desc=True)
except Exception as err:
flash("Error in performing request: {}".format(err), 'danger')
return redirect(url_for('select_values.index'))
Expand Down

0 comments on commit 5c70559

Please sign in to comment.