You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2018/12/17 20:32:37 UTC

[GitHub] ms32035 commented on a change in pull request #4258: [AIRFLOW-3423] Fix unauthenticated access for mongo hook

ms32035 commented on a change in pull request #4258: [AIRFLOW-3423] Fix unauthenticated access for mongo hook
URL: https://github.com/apache/incubator-airflow/pull/4258#discussion_r242305777
 
 

 ##########
 File path: airflow/contrib/hooks/mongo_hook.py
 ##########
 @@ -56,11 +56,11 @@ def get_conn(self):
         uri = 'mongodb://{creds}{host}{port}/{database}'.format(
             creds='{}:{}@'.format(
                 conn.login, conn.password
-            ) if conn.login is not None else '',
+            ) if conn.login else '',
 
             host=conn.host,
             port='' if conn.port is None else ':{}'.format(conn.port),
-            database='' if conn.schema is None else conn.schema
+            database=conn.schema
 
 Review comment:
   Airflow does not return `None` but `''`

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services