Skip to content

Commit

Permalink
Pass true for props into _build_sent_data when calling `update_in…
Browse files Browse the repository at this point in the history
…cident` (microsoft#774)

* Updated _build_sent_data to accept labels as a key for the nested properties object

* Changed implementation to pass true for proper parameter inside of update_incident instead of hardcoding "label" key in _built_sent_data

* Capitalized true to match keyword argument.

* Reformatting line for black

---------

Co-authored-by: ianhelle <ianhelle@microsoft.com>
  • Loading branch information
kylelol and ianhelle authored May 9, 2024
1 parent 36bd044 commit 1ccfe16
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion msticpy/context/azure/sentinel_incidents.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,9 @@ def update_incident(
update_items["title"] = incident_dets.iloc[0]["properties.title"]
if "status" not in update_items.keys():
update_items["status"] = incident_dets.iloc[0]["properties.status"]
data = _build_sent_data(update_items, etag=incident_dets.iloc[0]["etag"])
data = _build_sent_data(
update_items, props=True, etag=incident_dets.iloc[0]["etag"]
)
response = httpx.put(
incident_url,
headers=get_api_headers(self._token), # type: ignore
Expand Down

0 comments on commit 1ccfe16

Please sign in to comment.