mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-02 16:05:29 +00:00
fix: Clone endpoint 500
This commit is contained in:
@@ -59,7 +59,7 @@ class EndpointSerializer(BulkModelSerializer):
|
|||||||
return extra_kwargs
|
return extra_kwargs
|
||||||
|
|
||||||
def validate_is_active(self, value):
|
def validate_is_active(self, value):
|
||||||
if str(self.instance.id) == Endpoint.default_id:
|
if self.instance and str(self.instance.id) == Endpoint.default_id:
|
||||||
# 默认端点不能禁用
|
# 默认端点不能禁用
|
||||||
return True
|
return True
|
||||||
else:
|
else:
|
||||||
|
Reference in New Issue
Block a user