From 37acc8c692359b792a2c49f0ca4a477dda82d98a Mon Sep 17 00:00:00 2001 From: moisses89 <7888669+moisses89@users.noreply.github.com> Date: Fri, 28 Jul 2023 09:10:43 +0200 Subject: [PATCH] Add address to filter condition --- safe_transaction_service/history/models.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/safe_transaction_service/history/models.py b/safe_transaction_service/history/models.py index 73d53d416..21900847c 100644 --- a/safe_transaction_service/history/models.py +++ b/safe_transaction_service/history/models.py @@ -1306,7 +1306,10 @@ def with_confirmations_required(self): :return: queryset with `confirmations_required: int` field """ threshold_safe_status_query = ( - SafeStatus.objects.filter(internal_tx__ethereum_tx=OuterRef("ethereum_tx")) + SafeStatus.objects.filter( + address=OuterRef("safe"), + internal_tx__ethereum_tx=OuterRef("ethereum_tx"), + ) .sorted_reverse_by_mined() .values("threshold") )