Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

fix: #15548 Resolve errors in SQL queries caused by SELECT fields not appearing in the GROUP BY clause. (#17408)

bravomark5aa82629ddc7
diff --git a/api/services/tag_service.py b/api/services/tag_service.py
index 8cc903bde55..1fbaee96e88 100644
--- a/api/services/tag_service.py
+++ b/api/services/tag_service.py
@@ -20,7 +20,7 @@ class TagService:
)
if keyword:
query = query.filter(db.and_(Tag.name.ilike(f"%{keyword}%")))
- query = query.group_by(Tag.id, Tag.type, Tag.name)
+ query = query.group_by(Tag.id, Tag.type, Tag.name, Tag.created_at)
results: list = query.order_by(Tag.created_at.desc()).all()
return results