Skip to content

Commit 4f233f0

Browse files
committed
Minor changes.
1 parent 8b650bf commit 4f233f0

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/DAG/dag_parser.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -413,6 +413,7 @@ int ParseDAGRunCommand(RedisAI_RunInfo *rinfo, RedisModuleCtx *ctx, RedisModuleS
413413
goto cleanup;
414414
}
415415
rinfo->dagOpCount = array_len(rinfo->dagOps);
416+
if(rinfo->dagOpCount < 1) goto cleanup;
416417
if (_ParseDAGOps(ctx, rinfo) != REDISMODULE_OK)
417418
goto cleanup;
418419
if (_MangleTensorsNames(ctx, rinfo) != REDISMODULE_OK)

tests/flow/tests_dag.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,8 @@ def test_dag_keyspace_tensorget(env):
492492
"AI.TENSORSET persisted_tensor FLOAT 1 2 VALUES 5 10")
493493
env.assertEqual(ret, b'OK')
494494

495-
command = "AI.DAGRUN LOAD 1 persisted_tensor |> "\
495+
command = "AI.DAGRUN LOAD 1 persisted_tensor " \
496+
"|> "\
496497
"AI.TENSORGET persisted_tensor VALUES"
497498

498499
ret = con.execute_command(command)

0 commit comments

Comments
 (0)