bugraoz93 commented on a change in pull request #19377:
URL: https://github.com/apache/airflow/pull/19377#discussion_r749826953



##########
File path: airflow/providers/facebook/ads/hooks/ads.py
##########
@@ -118,11 +122,32 @@ def bulk_facebook_report(
         :param sleep_time: Time to sleep when async call is happening
         :type sleep_time: int
 
-        :return: Facebook Ads API response, converted to Facebook Ads Row 
objects
-        :rtype: List[AdsInsights]
+        :return: Facebook Ads API response,
+            converted to Facebook Ads Row objects regarding given Account ID 
type
+        :rtype: List[AdsInsights] or Dict[str, List[AdsInsights]]
         """
         api = self._get_service()
-        ad_account = AdAccount(api.get_default_account_id(), api=api)
+        if self.is_backward:
+            return self._facebook_report(
+                account_id=self.facebook_ads_config["account_id"],
+                api=api,
+                params=params,
+                fields=fields,
+                sleep_time=sleep_time,
+            )

Review comment:
       I have changed the controlling flag to a `cached_property`. You are 
right. It is definitely more readable and safer to use `cached_property` and 
not mutate any hook object in `_get_service` in this way.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to