Skip to content

Commit 51ab0a1

Browse files
Remove unnecessary type check
1 parent e9a0cba commit 51ab0a1

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

nemoguardrails/actions/v2_x/generation.py

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -173,15 +173,11 @@ async def _collect_user_intent_and_examples(
173173

174174
flow_config = state.flow_configs.get(flow_id, None)
175175
element_flow_state_instance = state.flow_id_states[flow_id]
176-
if (
177-
isinstance(flow_id, str)
178-
and flow_config is not None
179-
and (
180-
flow_config.has_meta_tag("user_intent")
181-
or (
182-
element_flow_state_instance
183-
and "_user_intent" in element_flow_state_instance[0].context
184-
)
176+
if flow_config is not None and (
177+
flow_config.has_meta_tag("user_intent")
178+
or (
179+
element_flow_state_instance
180+
and "_user_intent" in element_flow_state_instance[0].context
185181
)
186182
):
187183
if flow_config.elements[1]["_type"] == "doc_string_stmt":

0 commit comments

Comments
 (0)