mirror of
https://github.com/Monadical-SAS/reflector.git
synced 2025-12-20 20:29:06 +00:00
quick fix participant get create
This commit is contained in:
@@ -152,14 +152,17 @@ class Transcript(BaseModel):
|
||||
self.topics.append(topic)
|
||||
|
||||
def upsert_participant(self, participant: TranscriptParticipant):
|
||||
index = next(
|
||||
(i for i, p in enumerate(self.participants) if p.id == participant.id),
|
||||
None,
|
||||
)
|
||||
if index is not None:
|
||||
self.participants[index] = participant
|
||||
if self.participants:
|
||||
index = next(
|
||||
(i for i, p in enumerate(self.participants) if p.id == participant.id),
|
||||
None,
|
||||
)
|
||||
if index is not None:
|
||||
self.participants[index] = participant
|
||||
else:
|
||||
self.participants.append(participant)
|
||||
else:
|
||||
self.participants.append(participant)
|
||||
self.participants = [participant]
|
||||
return participant
|
||||
|
||||
def delete_participant(self, participant_id: str):
|
||||
|
||||
Reference in New Issue
Block a user