mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 01:33:05 +00:00
fix: 创建支持库校验url地址
This commit is contained in:
parent
f8ddca2029
commit
cc1b9a713e
|
|
@ -229,6 +229,10 @@ class DataSetSerializers(serializers.ModelSerializer):
|
|||
|
||||
def is_valid(self, *, raise_exception=False):
|
||||
super().is_valid(raise_exception=True)
|
||||
source_url = self.data.get('source_url')
|
||||
response = Fork(source_url, []).fork()
|
||||
if response.status == 500:
|
||||
raise AppApiException(500, f"url错误,无法解析【{source_url}】")
|
||||
return True
|
||||
|
||||
@staticmethod
|
||||
|
|
|
|||
Loading…
Reference in New Issue