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

Optimize alert and alert group public api endpoints, add filter by id #1274

Merged
merged 6 commits into from
Feb 3, 2023

Conversation

iskhakov
Copy link
Contributor

@iskhakov iskhakov commented Feb 2, 2023

What this PR does

Which issue(s) this PR fixes

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated

@iskhakov iskhakov marked this pull request as ready for review February 2, 2023 11:59
@iskhakov iskhakov requested a review from a team February 2, 2023 11:59
@iskhakov iskhakov requested a review from a team February 2, 2023 12:03
Copy link
Contributor

@joeyorlando joeyorlando left a comment

Choose a reason for hiding this comment

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

LGTM 👍

Copy link
Member

@vstpme vstpme left a comment

Choose a reason for hiding this comment

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

LGTM! Just one nitpick comment


def get_title(self, obj):
return obj.alerts.all()[0].title
return obj.alerts_count
Copy link
Member

Choose a reason for hiding this comment

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

nit: probably makes sense to add a comment that alerts_count is an annotated field which was added in get_queryset

@iskhakov iskhakov merged commit 335c8fe into dev Feb 3, 2023
@iskhakov iskhakov deleted the iskhakov/alert-public-api branch February 3, 2023 09:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants