dstandish commented on code in PR #24716:
URL: https://github.com/apache/airflow/pull/24716#discussion_r908958182


##########
airflow/providers/cncf/kubernetes/hooks/kubernetes.py:
##########
@@ -152,16 +152,16 @@ def conn_extras(self):
             extras = {}
         return extras
 
-    def _get_field(self, field_name):
+    def _get_field(self, field_name, default=None):
         if field_name.startswith('extra_'):
             raise ValueError(
                 f"Got prefixed name {field_name}; please remove the 
'extra__kubernetes__' prefix "
                 f"when using this method."
             )
         if field_name in self.conn_extras:
-            return self.conn_extras[field_name] or None
+            return self.conn_extras[field_name] or default

Review Comment:
   i think truthy is good here right cus you don't want to return empty string 
right?
   



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