mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 01:33:05 +00:00
fix: 【知识库】知识库设置,web站点地址格式错误,保存报错
This commit is contained in:
parent
0f42d0e9b2
commit
b153ca9e59
|
|
@ -9,6 +9,8 @@ import html2text as ht
|
|||
from bs4 import BeautifulSoup
|
||||
from urllib.parse import urljoin, urlparse, ParseResult, urlsplit, parse_qs
|
||||
|
||||
from common.exception.app_exception import AppApiException
|
||||
|
||||
requests.packages.urllib3.disable_warnings()
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ class MetaSerializer(serializers.Serializer):
|
|||
source_url = self.data.get('source_url')
|
||||
response = Fork(source_url, []).fork()
|
||||
if response.status == 500:
|
||||
raise AppApiException(500, response.message)
|
||||
raise AppApiException(500, f"url错误,无法解析【{source_url}】")
|
||||
|
||||
class BaseMeta(serializers.Serializer):
|
||||
def is_valid(self, *, raise_exception=False):
|
||||
|
|
|
|||
Loading…
Reference in New Issue