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

Ignore assignment candidates already on list of speakers on phase to voting #2768

Conversation

hjanott
Copy link
Member

@hjanott hjanott commented Dec 12, 2024

Closes #2761

@hjanott hjanott added the bug label Dec 12, 2024
@hjanott hjanott added this to the 4.2 milestone Dec 12, 2024
@hjanott hjanott requested a review from reiterl December 12, 2024 17:57
Copy link
Member

@reiterl reiterl left a 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"])
Copy link
Member

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.

Copy link
Member Author

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(
Copy link
Member

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...

Copy link
Member Author

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"],
Copy link
Member

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.

Copy link
Member Author

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.

@reiterl reiterl assigned hjanott and unassigned reiterl Dec 13, 2024
@Elblinator Elblinator modified the milestones: 4.2, 4.3 Dec 13, 2024
@hjanott hjanott assigned reiterl and unassigned hjanott Dec 13, 2024
@hjanott hjanott requested a review from reiterl December 13, 2024 10:18
Copy link
Member

@reiterl reiterl left a 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},
)
Copy link
Member

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.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks. Done so. :)

@reiterl reiterl self-requested a review December 13, 2024 11:02
@reiterl reiterl assigned hjanott and unassigned reiterl Dec 13, 2024
@hjanott hjanott assigned reiterl and unassigned hjanott Dec 16, 2024
Copy link
Member

@reiterl reiterl left a comment

Choose a reason for hiding this comment

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

LGTM.

@reiterl reiterl assigned hjanott and unassigned reiterl Dec 16, 2024
@hjanott hjanott requested a review from Elblinator December 16, 2024 11:06
@hjanott hjanott assigned reiterl and Elblinator and unassigned hjanott Dec 16, 2024
@reiterl reiterl removed their assignment Dec 16, 2024
@Elblinator Elblinator assigned hjanott and unassigned Elblinator Dec 18, 2024
@hjanott hjanott merged commit d578f5b into OpenSlides:main Dec 18, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix assignment.update if candidate is already on LoS
3 participants