Better checking TechnicalDataSet return type.

This commit is contained in:
Benoît Burnichon
2015-07-10 09:48:09 +02:00
parent 02cd830491
commit 4c1fcff4e6
6 changed files with 34 additions and 14 deletions

View File

@@ -110,8 +110,9 @@
{% set dataW = constant('media_subdef::TC_DATA_WIDTH') %}
{% set dataH = constant('media_subdef::TC_DATA_HEIGHT') %}
{% set width = record.get_technical_infos(dataW).value %}
{% set height = record.get_technical_infos(dataH).value %}
{% set technical_info = record.get_technical_infos %}
{% set width = technical_info[dataW].value %}
{% set height = technical_infos[dataH].value %}
{% if width and height %}
{% set ratio = (width / height)|number_format(2, '.') %}