uranusjr commented on code in PR #26765:
URL: https://github.com/apache/airflow/pull/26765#discussion_r982984699


##########
airflow/models/connection.py:
##########
@@ -206,13 +206,13 @@ def _parse_from_uri(self, uri: str):
 
     def get_uri(self) -> str:
         """Return connection in URI format"""
-        if '_' in self.conn_type:
+        if self.conn_type and '_' in self.conn_type:
             self.log.warning(
                 "Connection schemes (type: %s) shall not contain '_' according 
to RFC3986.",
                 self.conn_type,
             )
 
-        uri = f"{str(self.conn_type).lower().replace('_', '-')}://"
+        uri = f"{str(self.conn_type or 'none').lower().replace('_', '-')}://"

Review Comment:
   Technically the same? 😉 



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