Spaces:
Paused
Paused
Update backend/mongodb/operations/calls.py
Browse files
backend/mongodb/operations/calls.py
CHANGED
@@ -85,7 +85,7 @@ def list_transcripts_by_duration(collection, min_len: int, max_len: int):
|
|
85 |
|
86 |
def update_calls(collection, call_id: str, calls: UpdateCall = Body(...)):
|
87 |
# calls = {k: v for k, v in calls.model_dump().items() if v is not None} #loop in the dict
|
88 |
-
calls = {k: v for k, v in calls if v is not None} #loop in the dict
|
89 |
print(calls)
|
90 |
|
91 |
if len(calls) >= 1:
|
@@ -102,7 +102,7 @@ def update_calls(collection, call_id: str, calls: UpdateCall = Body(...)):
|
|
102 |
|
103 |
def update_captions(call_collection, user_collection, call_id: str, captions: UserCaptions = Body(...)):
|
104 |
# captions = {k: v for k, v in calls.model_dump().items() if v is not None}
|
105 |
-
captions = {k: v for k, v in captions if v is not None}
|
106 |
# print(captions)
|
107 |
|
108 |
# index user_id from caption object
|
|
|
85 |
|
86 |
def update_calls(collection, call_id: str, calls: UpdateCall = Body(...)):
|
87 |
# calls = {k: v for k, v in calls.model_dump().items() if v is not None} #loop in the dict
|
88 |
+
calls = {k: v for k, v in calls.items() if v is not None} #loop in the dict
|
89 |
print(calls)
|
90 |
|
91 |
if len(calls) >= 1:
|
|
|
102 |
|
103 |
def update_captions(call_collection, user_collection, call_id: str, captions: UserCaptions = Body(...)):
|
104 |
# captions = {k: v for k, v in calls.model_dump().items() if v is not None}
|
105 |
+
captions = {k: v for k, v in captions.items() if v is not None}
|
106 |
# print(captions)
|
107 |
|
108 |
# index user_id from caption object
|