Skip to content

Commit

Permalink
Check custom unit to prevent double quote char.
Browse files Browse the repository at this point in the history
  • Loading branch information
jon-ide committed Dec 13, 2024
1 parent 03bd786 commit 0322aa8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions webapp/views/data_tables/dt.py
Original file line number Diff line number Diff line change
Expand Up @@ -1495,6 +1495,10 @@ def attribute_numerical(filename=None, dt_node_id=None, node_id=None, mscale=Non
storage_type_system = form.storage_type_system.data
standard_unit = form.standard_unit.data
custom_unit = form.custom_unit.data
if '"' in custom_unit:
flash('The custom unit cannot contain a double quote ("). Please try again.', 'error')
url = url_for(PAGE_ATTRIBUTE_NUMERICAL, filename=filename, dt_node_id=dt_node_id, node_id=att_node_id, mscale=mscale)
return redirect(url)
custom_unit_definition = form.custom_unit_description.data
precision = form.precision.data
number_type = form.number_type.data
Expand Down

0 comments on commit 0322aa8

Please sign in to comment.