]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
toaster: layerdetails Don't show None type in description/summary
authorMichael Wood <michael.g.wood@intel.com>
Wed, 18 Feb 2015 15:09:44 +0000 (15:09 +0000)
committerAlexandru DAMIAN <alexandru.damian@intel.com>
Wed, 18 Feb 2015 19:08:41 +0000 (19:08 +0000)
When the result for the summary or description is None don't output the
result as the string version of None, use an empty value so that the
"Not set" mechanism works.

[YOCTO #7244]

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
lib/toaster/toastergui/templates/layerdetails.html

index 465d6330625e4d1506790e62878881d5e7af06ab..c162c8b95ca315e703f2466cf7e3ddf8ebeeb362 100644 (file)
                 </dt>
                 <dd>
                   <span class="muted" style="display:none">Not set</span>
-                  <span class="current-value">{{layerversion.layer.summary}}</span>
+                  <span class="current-value">{{layerversion.layer.summary|default_if_none:''}}</span>
                   <form style="display:none; margin-bottom:20px">
                     <textarea class="span12" rows="2">{% if layerversion.layer.summary %}{{layerversion.layer.summary}}{% endif %}</textarea>
                     <button class="btn change-btn" data-layer-prop="summary" type="button">Save</button>
                 </dt>
                 <dd>
                   <span class="muted" style="display:none">Not set</span>
-                  <span class="current-value">{{layerversion.layer.description}}</span>
+                  <span class="current-value">{{layerversion.layer.description|default_if_none:''}}</span>
                   <form style="display:none; margin-bottom:20px">
                     <textarea class="span12" rows="6">{% if layerversion.layer.description %}{{layerversion.layer.description}}{% endif %}</textarea>
                     <button class="btn change-btn" data-layer-prop="description" type="button" >Save</button>