Browse Source

fix: polls should be safe to resume

master
Dominique Merle 2 years ago
parent
commit
f65800f8d8
  1. 8
      addons/majority_judgment/nodes/MajorityJudgmentLinearResultsControl.gd

8
addons/majority_judgment/nodes/MajorityJudgmentLinearResultsControl.gd

@ -225,18 +225,14 @@ func start_provider(__provider):
__provider.start_providing()
var known_participants := Dictionary() # id => Participant
func get_or_create_participant(identifier:String) -> MajorityJudgmentParticipant:
if not known_participants.has(identifier):
known_participants[identifier] = MajorityJudgmentParticipant.make(identifier)
return known_participants[identifier]
return get_poll().get_or_create_participant(identifier)
var __save_mutex := Mutex.new() # perhaps overzealous
func __on_judgment_emitted(author_identifier, grade_index, candidate_index):
# Data comes from userland, best be careful here
# Data comes from userland, best be extra careful in here
if (
grade_index < 0
or

Loading…
Cancel
Save