File tree 2 files changed +2
-10
lines changed
src/phoenix/server/api/mutations
2 files changed +2
-10
lines changed Original file line number Diff line number Diff line change @@ -88,12 +88,8 @@ async def create_span_annotations(
88
88
q = select (models .SpanAnnotation ).where (
89
89
models .SpanAnnotation .span_rowid == span_rowid ,
90
90
models .SpanAnnotation .name == annotation_input .name ,
91
+ models .SpanAnnotation .identifier == resolved_identifier ,
91
92
)
92
- if resolved_identifier is None :
93
- q = q .where (models .SpanAnnotation .identifier .is_ (None ))
94
- else :
95
- q = q .where (models .SpanAnnotation .identifier == resolved_identifier )
96
-
97
93
existing_annotation = await session .scalar (q )
98
94
99
95
if existing_annotation :
Original file line number Diff line number Diff line change @@ -82,12 +82,8 @@ async def create_trace_annotations(
82
82
q = select (models .TraceAnnotation ).where (
83
83
models .TraceAnnotation .trace_rowid == trace_rowid ,
84
84
models .TraceAnnotation .name == annotation_input .name ,
85
+ models .TraceAnnotation .identifier == resolved_identifier ,
85
86
)
86
- if resolved_identifier is None :
87
- q = q .where (models .TraceAnnotation .identifier .is_ (None ))
88
- else :
89
- q = q .where (models .TraceAnnotation .identifier == resolved_identifier )
90
-
91
87
existing_annotation = await session .scalar (q )
92
88
93
89
if existing_annotation :
You can’t perform that action at this time.
0 commit comments