You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I get the following error when testing a new group, from API post.
"title": "Invalid incident",
"description": "invalid role oncall-primary for target Z_JDGROUP"
The group has a primary user on standby.
"
/opt/iris/src/iris/api.py
========================= This is the code where it fails =====
for dynamic_target in target_list:
target = session.execute('''SELECT target_role.id AS role_id, target.id AS target_id
FROM target JOIN target_role
ON target_role.type_id = target.type_id
WHERE target.name = :target
AND target_role.name = :role''', dynamic_target).fetchone()
if target is None:
raise HTTPBadRequest('Invalid incident', 'invalid role %s for target %s' %
(dynamic_target['role'], dynamic_target['target']))
else:
dynamic_targets.append(target)
I suspect there is a mismatch between OnCall and IRIS db, but cant prove it, (or don't know how to prove it)
Is there a DB schema ? Or can someone help me with a SQL query to check both OnCall and IRIS ?
The text was updated successfully, but these errors were encountered:
Hi All
I get the following error when testing a new group, from API post.
"title": "Invalid incident",
"description": "invalid role oncall-primary for target Z_JDGROUP"
The group has a primary user on standby.
"
/opt/iris/src/iris/api.py
========================= This is the code where it fails =====
for dynamic_target in target_list:
target = session.execute('''SELECT
target_role
.id
ASrole_id
,target
.id
AStarget_id
FROM
target
JOINtarget_role
ON
target_role
.type_id
=target
.type_id
WHERE
target
.name
= :targetAND
target_role
.name
= :role''', dynamic_target).fetchone()if target is None:
raise HTTPBadRequest('Invalid incident', 'invalid role %s for target %s' %
(dynamic_target['role'], dynamic_target['target']))
else:
dynamic_targets.append(target)
I suspect there is a mismatch between OnCall and IRIS db, but cant prove it, (or don't know how to prove it)
Is there a DB schema ? Or can someone help me with a SQL query to check both OnCall and IRIS ?
The text was updated successfully, but these errors were encountered: