Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: query filter in list task endpoint #178

Merged
merged 8 commits into from
Jul 22, 2024
Merged

fix: query filter in list task endpoint #178

merged 8 commits into from
Jul 22, 2024

Conversation

Ayush5120
Copy link
Contributor

@Ayush5120 Ayush5120 commented Jun 12, 2024

Fixes #177
Fixes #175

Summary by Sourcery

This pull request addresses a bug in the list tasks endpoint by ensuring that 'user_id' and 'name_prefix' filters are only added to the filter dictionary if they are not None.

  • Bug Fixes:
    • Fixed an issue where the 'user_id' and 'name_prefix' filters in the list tasks endpoint were not properly handling None values.

Copy link

sourcery-ai bot commented Jun 12, 2024

Reviewer's Guide by Sourcery

This pull request addresses issue #177 by fixing the query filter in the list task endpoint. The changes ensure that the filters for 'user_id' and 'name_prefix' are only added to the filter dictionary if they are not None, preventing potential errors when these values are missing.

File-Level Changes

Files Changes
pro_tes/ga4gh/tes/task_runs.py Improved the robustness of the query filter in the list task endpoint by adding None checks for 'user_id' and 'name_prefix'.

Tips
  • Trigger a new Sourcery review by commenting @sourcery-ai review on the pull request.
  • You can change your review settings at any time by accessing your dashboard:
    • Enable or disable the Sourcery-generated pull request summary or reviewer's guide;
    • Change the review language;
  • You can always contact us if you have any questions or feedback.

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @Ayush5120 - I've reviewed your changes and they look great!

Here's what I looked at during the review
  • 🟡 General issues: 1 issue found
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟡 Complexity: 1 issue found

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.

pro_tes/ga4gh/tes/task_runs.py Show resolved Hide resolved
pro_tes/ga4gh/tes/task_runs.py Show resolved Hide resolved
@uniqueg uniqueg changed the title fix: querry filter in list task endpoint fix: query filter in list task endpoint Jun 17, 2024
Copy link
Member

@uniqueg uniqueg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, but before merging: @athith-g - can you please confirm that this PR solves #175 for you?

@uniqueg uniqueg requested a review from athith-g June 20, 2024 14:43
Copy link
Contributor

@athith-g athith-g left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It does fix #175 👍

Copy link
Member

@uniqueg uniqueg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's good to hear. However, linting and tests fail - please check, @Ayush5120 🙏

@Ayush5120 Ayush5120 requested a review from uniqueg June 24, 2024 06:47
Copy link
Member

@uniqueg uniqueg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please explain why we are ignoring types?

pro_tes/utils/db.py Outdated Show resolved Hide resolved
pro_tes/utils/db.py Outdated Show resolved Hide resolved
pro_tes/utils/db.py Outdated Show resolved Hide resolved
pro_tes/utils/db.py Outdated Show resolved Hide resolved
@Ayush5120 Ayush5120 requested a review from uniqueg July 3, 2024 07:33
@athith-g athith-g mentioned this pull request Jul 9, 2024
9 tasks
@uniqueg uniqueg merged commit 0920812 into dev Jul 22, 2024
5 checks passed
@uniqueg uniqueg deleted the fix_querry_filter branch July 22, 2024 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants