Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion keep/api/core/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,7 @@ def get_workflows_with_last_execution(tenant_id: str) -> List[dict]:
)
.where(Workflow.tenant_id == tenant_id)
.where(Workflow.is_deleted == False)
)
).distinct()

result = session.execute(workflows_with_last_execution_query).all()

Expand Down
8 changes: 8 additions & 0 deletions tests/test_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,3 +225,11 @@ def test_encode():

def test_dict_to_key_value_list():
assert functions.dict_to_key_value_list({"a": 1, "b": "test"}) == ["a:1", "b:test"]


def test_slice():
assert functions.slice("long string", 0, 4) == "long"


def test_slice_no_end():
assert functions.slice("long string", 5) == "string"