Skip to content

Commit

Permalink
fix: key not found error
Browse files Browse the repository at this point in the history
  • Loading branch information
itsmihir committed Jul 30, 2024
1 parent 9334b0e commit 7afb96a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions alerta/models/alert.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ def get_rudder_resource_from_tags(tags):

def add_custom_labels(labels: JSON):
# for profiles alerts, add profile_id as a label
if labels['category'] == 'wht' and 'job_id' in labels:
labels['profile_id'] = labels['job_id']
if labels.get('category') == 'wht' and 'job_id' in labels:
labels['profile_id'] = labels.get('job_id')
return labels;

class Alert:
Expand Down

0 comments on commit 7afb96a

Please sign in to comment.