mirror of
https://github.com/Monadical-SAS/reflector.git
synced 2025-12-21 20:59:05 +00:00
Merge pull request #335 from Monadical-SAS/sara/UI-improvements
Sara/UI improvements & fix transcript deletion
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
import json
|
||||
import os
|
||||
import shutil
|
||||
from contextlib import asynccontextmanager
|
||||
from datetime import datetime
|
||||
from pathlib import Path
|
||||
@@ -188,7 +190,8 @@ class Transcript(BaseModel):
|
||||
return [participant.model_dump(mode=mode) for participant in self.participants]
|
||||
|
||||
def unlink(self):
|
||||
self.data_path.unlink(missing_ok=True)
|
||||
if os.path.exists(self.data_path) and os.path.isdir(self.data_path):
|
||||
shutil.rmtree(self.data_path)
|
||||
|
||||
@property
|
||||
def data_path(self):
|
||||
|
||||
Reference in New Issue
Block a user