(self, data_dict)
Feed a block from a block dict.
Feed a block from a block dict.
Feed a block from a block dict .
def from_dict(self, data_dict):
        """Feed a block from a block dict."""
        component = data_dict.get('componentName', 'N/A')
        if component != 'TsAggregationGroupCompact':
            raise TypeError('Not an aggregation group block.')

        props = data_dict.get('componentProps', {})
        group_dict = props.get('aggregation_group')
        if not group_dict:
            raise TypeError('Aggregation group not defined')

        self._group_id = group_dict.get('id', 0)
        self._group_name = group_dict.get('name', '')
def from_dict ( self , data_dict ) : component = data_dict . get ( 'componentName' , 'N/A' ) if component != 'TsAggregationGroupCompact' : raise TypeError ( 'Not an aggregation group block.' ) props = data_dict . get ( 'componentProps' , { } ) group_dict = props . get ( 'aggregation_group' ) if not group_dict : raise TypeError ( 'Aggregation group not defined' ) self . _group_id = group_dict . get ( 'id' , 0 ) self . _group_name = group_dict . get ( 'name' , '' )