bitbake: toaster: layerdetails Don't show None type in description/summary
PATCH 1/1 bitbake: toaster: layerdetails Don't show None type in description/summary
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]
--- bitbake/lib/toaster/toastergui/templates/layerdetails.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
bitbake/lib/toaster/toastergui/templates/layerdetails.html +2 -2
@@ -453,7 +453,7 @@ </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>
@@ -467,7 +467,7 @@ </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>
Signature · 1 line
2.1.0
Taken for submission.
Cheers,
Alex
Quoted 53 lines · Michael Wood
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 <[email protected]>--- bitbake/lib/toaster/toastergui/templates/layerdetails.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)bitbake/lib/toaster/toastergui/templates/layerdetails.html +0
-1@@ -453,7 +453,7 @@ </dt> <dd> <span class="muted" style="display:none">Not set</span> - <spanclass="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>bitbake/lib/toaster/toastergui/templates/layerdetails.html +0
-1@@ -467,7 +467,7 @@ </dt> <dd> <span class="muted" style="display:none">Not set</span> - <spanclass="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>
--
2.1.0--
_______________________________________________
toaster mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/toaster
Signature · 3 lines
Alex Damian Yocto Project SSG / OTC