-
Notifications
You must be signed in to change notification settings - Fork 54
feat(projects): add check for finding next relevant page #1192
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
feat(projects): add check for finding next relevant page #1192
Conversation
9796e9e to
f3b8850
Compare
f3b8850 to
9756d2c
Compare
3e06cd8 to
c90ea63
Compare
c90ea63 to
f788af7
Compare
Signed-off-by: David Wallace <[email protected]>
f4d75ac to
6f8244e
Compare
jochenklar
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, works nicely. Do we test this? Otherwise only style feedback.
| values = self.project.values.filter(snapshot=None).select_related('attribute', 'option') | ||
|
|
||
| if check_conditions(conditions, values): | ||
| sets = compute_sets(values) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder how much more expensive this is. In the future we could move functions like compute_sets to the manager. Just having ideas...
|
ok thanks! Yes think that a certain specific test case would be maybe appropriate here, I'll add one. |
Signed-off-by: David Wallace <[email protected]>
Signed-off-by: David Wallace <[email protected]>
|
when tests pass, it's ready for review/merge |
Signed-off-by: David Wallace <[email protected]>
rdmo/projects/progress.py
Outdated
| ) | ||
|
|
||
| # If no current_page, return None | ||
| if not current_page: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some current_page need to be renamed to next_page
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
snap, thanks! Ive updated it now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, now also with comments
jochenklar
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🙃 the comments ...
Signed-off-by: David Wallace <[email protected]>
59f80bd to
365b892
Compare
jochenklar
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉
Description
Related issue: #1191
Adds the method
compute_next_relevant_pageinprogress.py.Refactors
compute_show_pageto be able to re-used inProjectPageViewSetfor finding the next relevant page.Motivation and Context
How has this been tested?
Screenshots (if appropriate)