-
Notifications
You must be signed in to change notification settings - Fork 27
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
Ignore assignment candidates already on list of speakers on phase to voting #2768
Ignore assignment candidates already on list of speakers on phase to voting #2768
Conversation
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 of my comments needs to be addressed.
@@ -63,6 +81,8 @@ def update_instance(self, instance: dict[str, Any]) -> dict[str, Any]: | |||
) | |||
] | |||
)["assignment_candidate"].values() | |||
if (meeting_user_id := candidate["meeting_user_id"]) |
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.
Why use the walross notation here ? I would prefer using candidate... twice.
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.
Changed that but the if statement will still be over two lines.
self.prepare_voting_phase_test(3) | ||
self.request("speaker.create", {"meeting_user_id": 1, "list_of_speakers_id": 1}) | ||
response = self.request( |
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.
Both must be checked: Putting on list and putting not on list, because already there, I see one test, hmm...
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.
Wrote that additional test.
[ | ||
GetManyRequest( | ||
"speaker", | ||
list_of_speakers["speaker_ids"], |
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.
Are you sure, that los always contains a speaker_ids and that it is not empty? Please write a test with an empty los and try it.
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.
Good point. I fixed that.
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.
Missing check in two tests.
self.assert_model_exists( | ||
f"speaker/{id_}", | ||
{"list_of_speakers_id": 1, "meeting_user_id": id_, "meeting_id": 1}, | ||
) |
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.
Mmh, I think you want to check the los here too. That it just have three speakers in it. Also check the los in the test below.
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.
Thanks. Done so. :)
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.
LGTM.
Closes #2761