Skip to content

Commit

Permalink
feat: add hook strategy type in createion.
Browse files Browse the repository at this point in the history
  • Loading branch information
Bidaya0 committed Aug 3, 2023
1 parent 90c91b8 commit 5cf91a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dongtai_web/views/engine_hook_rule_add.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ def post(self, request):
return R.failure(data=e.detail, msg=_("Incomplete parameter, please check again"))
# for compatibility only
# the "type" not in ser.validated_data should be remove.
if ser.validated_data["type"] == 4 or (
if ("type" in ser.validated_data and ser.validated_data["type"] == 4) or (
"type" not in ser.validated_data and ser.validated_data["rule_target"] == ""
):
hook_type = IastStrategyModel.objects.filter(
Expand Down

0 comments on commit 5cf91a1

Please sign in to comment.