v1.1.51: fix seed — list/get also match global defaults (client_id='' stand='')
This commit is contained in:
@@ -23,7 +23,8 @@ def list_definitions(client_id, stand):
|
||||
cur.execute("""
|
||||
SELECT id, name, steps, version, is_active, created_at, updated_at
|
||||
FROM scenario_definitions
|
||||
WHERE client_id = %s AND stand = %s AND is_active = TRUE
|
||||
WHERE is_active = TRUE
|
||||
AND ((client_id = %s AND stand = %s) OR (client_id = '' AND stand = ''))
|
||||
ORDER BY name
|
||||
""", (client_id, stand))
|
||||
rows = cur.fetchall()
|
||||
@@ -51,7 +52,7 @@ def get_definition(def_id, client_id, stand):
|
||||
cur.execute("""
|
||||
SELECT id, name, steps, version, is_active, created_at, updated_at, updated_by
|
||||
FROM scenario_definitions
|
||||
WHERE id = %s AND client_id = %s AND stand = %s
|
||||
WHERE id = %s AND ((client_id = %s AND stand = %s) OR (client_id = '' AND stand = ''))
|
||||
""", (def_id, client_id, stand))
|
||||
row = cur.fetchone()
|
||||
if not row:
|
||||
|
||||
Reference in New Issue
Block a user