ferruzzi commented on code in PR #27043:
URL: https://github.com/apache/airflow/pull/27043#discussion_r1001987908


##########
airflow/providers/asana/hooks/asana.py:
##########
@@ -39,8 +68,21 @@ def __init__(self, conn_id: str = default_conn_name, *args, 
**kwargs) -> None:
         super().__init__(*args, **kwargs)
         self.connection = self.get_connection(conn_id)
         extras = self.connection.extra_dejson
-        self.workspace = extras.get("extra__asana__workspace") or None
-        self.project = extras.get("extra__asana__project") or None
+        self.workspace = self._get_field(extras, "workspace") or None
+        self.project = self._get_field(extras, "project") or None
+

Review Comment:
   Nah, you're right.  The big one to me is that basehook would mean waiting 
for airflow core to update so the providers can inherit it.   If you do it this 
way, it's a little more work but it's "immediate" and self-contained.    I 
think you made the right call even if it means some redundant code.



-- 
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