Skip to content

Commit

Permalink
Merge pull request #1801 from st1020/fix/modify-rule-value
Browse files Browse the repository at this point in the history
fix: modify rule value
  • Loading branch information
st1020 authored Sep 13, 2023
2 parents 383c40e + 7a68866 commit 015e511
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dongtai_web/views/engine_hook_rule_modify.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ def post(self, request):
strategy = HookStrategy.objects.filter(id=rule_id).first()
if not strategy:
return R.failure(msg=_("No such hookstrategy."))
if strategy.system_type:
if strategy.system_type and rule_value != strategy.value:
return R.failure(msg="Can not modify preset rule")
if HookStrategy.objects.filter(language_id=strategy.language_id, type=strategy.type, value=rule_value).exists():
return R.failure(msg="Already exists same rule")
Expand Down

0 comments on commit 015e511

Please sign in to comment.