airflow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <>
Subject [GitHub] XD-DENG closed pull request #3731: [AIRFLOW-2885] Fix a bug in www_rbac.utils.get_params
Date Thu, 16 Aug 2018 02:53:30 GMT
XD-DENG closed pull request #3731: [AIRFLOW-2885] Fix a bug in www_rbac.utils.get_params

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/airflow/www_rbac/ b/airflow/www_rbac/
index 7bbdada555..ddbf90afd9 100644
--- a/airflow/www_rbac/
+++ b/airflow/www_rbac/
@@ -66,7 +66,7 @@ def get_params(**kwargs):
             if v or v is None:
             params.append('{}={}'.format(k, v))
-        elif v:
+        elif v is not None:
             params.append('{}={}'.format(k, v))
     params = sorted(params, key=lambda x: x.split('=')[0])
     return '&'.join(params)
diff --git a/tests/www_rbac/ b/tests/www_rbac/
index 05114881dd..1f5df30fd8 100644
--- a/tests/www_rbac/
+++ b/tests/www_rbac/
@@ -109,6 +109,11 @@ def test_params_all(self):
                          utils.get_params(showPaused=False, page=3, search='bash_'))
+    def test_params_all_page_zero(self):
+        """Should return params string ordered by param key"""
+        self.assertEqual('page=0&search=bash_&showPaused=False',
+                         utils.get_params(showPaused=False, page=0, search='bash_'))
 if __name__ == '__main__':


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:

With regards,
Apache Git Services

View raw message