Attribute scores (#7100)

* rework attributes to get scores

* show sublabel score

* formatting
This commit is contained in:
Blake Blackshear
2023-07-09 11:40:39 -05:00
committed by GitHub
parent 5e772c3625
commit 7c0d25f9da
6 changed files with 58 additions and 20 deletions

View File

@@ -199,7 +199,8 @@ class EventProcessor(threading.Thread):
# only overwrite the sub_label in the database if it's set
if event_data.get("sub_label") is not None:
event[Event.sub_label] = event_data["sub_label"]
event[Event.sub_label] = event_data["sub_label"][0]
event[Event.data]["sub_label_score"] = event_data["sub_label"][1]
(
Event.insert(event)