[PATCH seda] [views] UnitBusinessValueEntityView doesn't apply to Shape

Philippe Pepiot philippe.pepiot at logilab.fr
Thu Jun 22 15:50:03 CEST 2017


On 06/22/2017 11:53 AM, Sylvain Thenault wrote:
> # HG changeset patch
> # User Sylvain Thénault <sylvain.thenault at logilab.fr>
> # Date 1498125123 -7200
> #      Thu Jun 22 11:52:03 2017 +0200
> # Node ID 3febc73ffa1bd9a7e45ce7585968b7ec0ac0a38e
> # Parent  8e9585bcc97c08613d5a42d73b60bbe3b48d72bc
> [views] UnitBusinessValueEntityView doesn't apply to Shape
> 
> since it does not have a unit.
> 
> Closes #17085681
> 

Applied, thanks !

> diff --git a/cubicweb_seda/views/dataobject.py b/cubicweb_seda/views/dataobject.py
> --- a/cubicweb_seda/views/dataobject.py
> +++ b/cubicweb_seda/views/dataobject.py
> @@ -309,11 +309,11 @@ class RelationshipReverseEntityView(view
>          self.w(xml_escape(msg))
>  
>  
>  class UnitBusinessValueEntityView(viewlib.BusinessValueEntityView):
>  
> -    __select__ = is_instance('SEDAWidth', 'SEDAHeight', 'SEDADepth', 'SEDAShape',
> +    __select__ = is_instance('SEDAWidth', 'SEDAHeight', 'SEDADepth',
>                               'SEDADiameter', 'SEDALength', 'SEDAThickness', 'SEDAWeight')
>  
>      def entity_call(self, entity):
>          super(UnitBusinessValueEntityView, self).entity_call(entity)
>          if entity.seda_unit:
> 



More information about the saem-devel mailing list