diff --git a/anyway/widgets/road_segment_widgets/street_view_widget.py b/anyway/widgets/road_segment_widgets/street_view_widget.py index 13c7571b..bb6ff27a 100644 --- a/anyway/widgets/road_segment_widgets/street_view_widget.py +++ b/anyway/widgets/road_segment_widgets/street_view_widget.py @@ -31,11 +31,7 @@ def localize_items(request_params: RequestParams, items: Dict) -> Dict: @classmethod def update_result(cls, request_params: RequestParams, cached_items: Dict) -> Optional[Dict]: - if cls.is_relevant(request_params): - w = cls(request_params) # pylint: disable=E1120 - try: - w.generate_items() - updated_widget_data = w.serialize() - return updated_widget_data if w.is_included() else None - except Exception as e: - logging.debug(f"Encountered error when generating items for {w.name} : {e}") \ No newline at end of file + try: + return cls.generate_widget_data(request_params) + except Exception as e: + logging.debug(f"Encountered error when generating items for widget class {cls} : {e}")