From d98e5a4efc8e94820613cda5cf3fc089bc18cc47 Mon Sep 17 00:00:00 2001 From: Saksham Gupta Date: Sat, 16 Jan 2021 23:05:40 +0530 Subject: [PATCH 1/2] Fix #16464 - Relation view with default to current database when creating relations Fixes: #16464 Signed-off-by: Saksham Gupta --- templates/table/relation/foreign_key_row.twig | 3 ++- templates/table/relation/relational_dropdown.twig | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/templates/table/relation/foreign_key_row.twig b/templates/table/relation/foreign_key_row.twig index fd4e874910..21bec0335c 100644 --- a/templates/table/relation/foreign_key_row.twig +++ b/templates/table/relation/foreign_key_row.twig @@ -96,7 +96,8 @@ 'name': 'destination_foreign_db[' ~ i ~ ']', 'title': 'Database'|trans, 'values': databases, - 'foreign': foreign_db + 'foreign': foreign_db, + 'db': db } only %} diff --git a/templates/table/relation/relational_dropdown.twig b/templates/table/relation/relational_dropdown.twig index 9d5f3c979f..522f08a096 100644 --- a/templates/table/relation/relational_dropdown.twig +++ b/templates/table/relation/relational_dropdown.twig @@ -3,7 +3,8 @@ {% set seen_key = false %} {% for value in values %}