#4139 Ignore case on API status filtering
Merged 5 years ago by pingou. Opened 5 years ago by lenkaseg.
Unknown source status_ignore_case  into  master

file modified
+2 -2
@@ -5,8 +5,8 @@

  RUN mkdir /code

  

  RUN dnf install -y python3-devel python3-setuptools python3-nose python3-bcrypt python3-alembic \

-                    python3-arrow python-binaryornot python-bleach python-blinker \

-                    python-chardet python-cryptography python-docutils python3-flask \

+                    python3-arrow python3-binaryornot python3-bleach python3-blinker \

+                    python3-chardet python3-cryptography python3-docutils python3-flask \

                     python3-flask-wtf python3-markdown python3-psutil \

                     python3-pygit2 python3-fedora python3-openid python3-openid-cla \

                     python3-openid-teams python3-straight-plugin python3-wtforms python3-munch \

file modified
+3 -1
@@ -3176,7 +3176,9 @@

              else:

                  query = query.filter(model.PullRequest.status != "Open")

          else:

-             query = query.filter(model.PullRequest.status == status)

+             query = query.filter(

+                 func.lower(model.PullRequest.status) == status.lower()

+             )

  

      if assignee is not None:

          assignee = "%s" % assignee

There were some dependencies in docker/worker, which I didn't convert to python3 previously.

The second commit is about ignoring the case for the status filtering. I think it would be nicer if it's possible to filter statuses with lower case: status=open (as well as status=Open)

Fair, thanks :)

I'll wait for jenkins and if it's happy, I'll merge :)

Looks like there is at least one test failing

2 new commits added

  • ignore case in status filtering
  • fix the rest of the worker dependencies for python3
5 years ago

It looks like it was only the test_style.py

Pretty please pagure-ci rebuild

Pretty please pagure-ci rebuild

Pretty please pagure-ci rebuild

oh, it's successful now...

Pull-Request has been merged by pingou

5 years ago