All of lore.kernel.org
 help / color / mirror / Atom feed
* [review-request][PATCH] bitbake: toaster: layerdetails Don't show None type in description/summary
@ 2015-02-18 15:09 Michael Wood
  2015-02-18 18:45 ` Damian, Alexandru
  0 siblings, 1 reply; 2+ messages in thread
From: Michael Wood @ 2015-02-18 15:09 UTC (permalink / raw)
  To: toaster

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>
---
 bitbake/lib/toaster/toastergui/templates/layerdetails.html | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/bitbake/lib/toaster/toastergui/templates/layerdetails.html b/bitbake/lib/toaster/toastergui/templates/layerdetails.html
index 465d633..c162c8b 100644
--- a/bitbake/lib/toaster/toastergui/templates/layerdetails.html
+++ b/bitbake/lib/toaster/toastergui/templates/layerdetails.html
@@ -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>
-- 
2.1.0



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [review-request][PATCH] bitbake: toaster: layerdetails Don't show None type in description/summary
  2015-02-18 15:09 [review-request][PATCH] bitbake: toaster: layerdetails Don't show None type in description/summary Michael Wood
@ 2015-02-18 18:45 ` Damian, Alexandru
  0 siblings, 0 replies; 2+ messages in thread
From: Damian, Alexandru @ 2015-02-18 18:45 UTC (permalink / raw)
  To: Michael Wood; +Cc: toaster

[-- Attachment #1: Type: text/plain, Size: 2452 bytes --]

Taken for submission.

Cheers,
Alex

On Wed, Feb 18, 2015 at 3:09 PM, Michael Wood <michael.g.wood@intel.com>
wrote:

> 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>
> ---
>  bitbake/lib/toaster/toastergui/templates/layerdetails.html | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/bitbake/lib/toaster/toastergui/templates/layerdetails.html
> b/bitbake/lib/toaster/toastergui/templates/layerdetails.html
> index 465d633..c162c8b 100644
> --- a/bitbake/lib/toaster/toastergui/templates/layerdetails.html
> +++ b/bitbake/lib/toaster/toastergui/templates/layerdetails.html
> @@ -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>
> --
> 2.1.0
>
> --
> _______________________________________________
> toaster mailing list
> toaster@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/toaster
>



-- 
Alex Damian
Yocto Project
SSG / OTC

[-- Attachment #2: Type: text/html, Size: 3750 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-02-18 18:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-18 15:09 [review-request][PATCH] bitbake: toaster: layerdetails Don't show None type in description/summary Michael Wood
2015-02-18 18:45 ` Damian, Alexandru

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.