mirror of
https://github.com/langgenius/dify.git
synced 2026-09-08 11:04:27 +08:00
fix: fix ci failed
This commit is contained in:
parent
94dfaae3d0
commit
35ddd2b6f4
@ -1,7 +1,7 @@
|
||||
"""add workspace skill management
|
||||
|
||||
Revision ID: a4f8d2c9e1b0
|
||||
Revises: c3d4e5f6a7b8
|
||||
Revises: d2825e7b9c10
|
||||
Create Date: 2026-07-09 12:00:00.000000
|
||||
|
||||
"""
|
||||
@ -14,7 +14,7 @@ from models.types import StringUUID
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = "a4f8d2c9e1b0"
|
||||
down_revision = "c3d4e5f6a7b8"
|
||||
down_revision = "d2825e7b9c10"
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
@ -25,6 +25,7 @@ from typing import Any
|
||||
from uuid import uuid4
|
||||
|
||||
import yaml
|
||||
from yaml.error import MarkedYAMLError
|
||||
from pydantic import BaseModel, ConfigDict, Field, field_validator, model_validator
|
||||
from sqlalchemy import delete, func, select
|
||||
from sqlalchemy.exc import IntegrityError, SQLAlchemyError
|
||||
@ -2275,9 +2276,8 @@ class SkillManagementService:
|
||||
payload = yaml.safe_load(match.group(1)) or {}
|
||||
except yaml.YAMLError as exc:
|
||||
line = None
|
||||
mark = getattr(exc, "problem_mark", None)
|
||||
if mark is not None:
|
||||
line = int(mark.line) + 2
|
||||
if isinstance(exc, MarkedYAMLError) and exc.problem_mark is not None:
|
||||
line = int(exc.problem_mark.line) + 2
|
||||
raise SkillManagementServiceError(
|
||||
"invalid_skill_md",
|
||||
f"SKILL.md frontmatter YAML is invalid: {exc}",
|
||||
|
||||
@ -16,6 +16,10 @@ vi.mock('@/next/navigation', () => ({
|
||||
useRouter: () => ({ push: mockPush, replace: mockReplace }),
|
||||
}))
|
||||
|
||||
vi.mock('@/hooks/use-document-title', () => ({
|
||||
default: vi.fn(),
|
||||
}))
|
||||
|
||||
vi.mock('@/service/common', () => ({
|
||||
fetchSetupStatus: vi.fn(),
|
||||
fetchInitValidateStatus: vi.fn(),
|
||||
|
||||
Loading…
Reference in New Issue
Block a user