Skip to content

Commit

Permalink
fix(backend): 去掉redis 版本升级校验 TencentBlueKing#7698
Browse files Browse the repository at this point in the history
  • Loading branch information
iSecloud committed Nov 1, 2024
1 parent 6e4f6b4 commit 0a6f704
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,15 @@ class UpdateInfoSerializer(serializers.Serializer):
def to_representation(self, details):
return details

def validate(self, attrs):
def validate_version_update(self, attrs):
for info in attrs["infos"]:
# 校验当前版本不能和目标版本一致
if info["target_version"] in info["current_versions"]:
raise serializers.ValidationError(_("当前版本不能和目标版本{}一致").format(info["current_versions"]))

def validate(self, attrs):
# 暂时去掉对版本校验,允许同版本升级
# self.validate_version_update(attrs)
return attrs


Expand Down

0 comments on commit 0a6f704

Please sign in to comment.