Skip to content

Commit 830d244

Browse files
committed
Fixed type validation on options.chart.height.
1 parent 6461aa4 commit 830d244

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

highcharts_core/options/chart/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ def height(self, value):
523523
self._height = validators.numeric(value,
524524
allow_empty = False,
525525
minimum = 0)
526-
except ValueError:
526+
except (ValueError, TypeError):
527527
self._height = validators.string(value,
528528
allow_empty = False)
529529
except ValueError:

tests/options/chart/test_chart.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212

1313
STANDARD_PARAMS = [
1414
({}, None),
15+
({
16+
'height': '60%'
17+
}, None),
1518
({
1619
'align_thresholds': True,
1720
'align_ticks': True,

0 commit comments

Comments
 (0)