Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: modify rule value #1801

Merged
merged 1 commit into from Sep 13, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion dongtai_web/views/engine_hook_rule_modify.py
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