Skip to content

Commit

Permalink
feat: Update participant_id assignment in CongoSameDiff class (#1004)
Browse files Browse the repository at this point in the history
The participant_id assignment in the CongoSameDiff class has been updated to use the session's participant ID instead of generating using the participant_id_url property as a base for the pattern index.
  • Loading branch information
drikusroor authored May 7, 2024
1 parent b17ba88 commit 8e41da2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/experiment/rules/congosamediff.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def next_round(self, session: Session):
variants_amount = real_trial_variants.count()

# get the participant's group variant based on the participant's id # else default to random number between 1 and variants_amount
participant_id = int(session.participant.participant_id_url) if session.participant.participant_id_url else random.randint(1, variants_amount * 2)
participant_id = session.participant.id
participant_group_variant = self.get_participant_group_variant(
participant_id,
group_number,
Expand Down

0 comments on commit 8e41da2

Please sign in to comment.