Skip to content

Commit

Permalink
Safely handle a potential KeyError inside zoom operation passcode dis…
Browse files Browse the repository at this point in the history
…abled (#749)

* Safely handle zoom non-update events
  • Loading branch information
allanbreyes authored May 11, 2023
1 parent 2ffc054 commit 000807e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ def rule(event):
return False

context = get_context(event)
return "Passcode" in context["Change"] and context["DisabledSetting"]
changed = "Passcode" in context.get("Change", "")
disabled = context.get("DisabledSetting", False)
return changed and disabled


def title(event):
Expand Down
12 changes: 12 additions & 0 deletions rules/zoom_operation_rules/zoom_operation_passcode_disabled.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,15 @@ Tests:
"operation_detail": "Edit Group Springfield - Personal Meeting ID (PMI) Passcode: from Off to On",
"p_log_type": "Zoom.Operation",
}
-
Name: Add User Group
ExpectedResult: false
Log:
{
"time": "2021-11-17 00:37:24Z",
"operator": "[email protected]",
"category_type": "User Group",
"action": "Add",
"operation_detail": "Add Group Engineers",
"p_log_type": "Zoom.Operation",
}

0 comments on commit 000807e

Please sign in to comment.