zingorn 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_r237814945
##########
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 '',
Review comment:
just `if conn.login else ''` ?
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services