diff --git a/safe_transaction_service/history/serializers.py b/safe_transaction_service/history/serializers.py index f724292ce..fdb071918 100644 --- a/safe_transaction_service/history/serializers.py +++ b/safe_transaction_service/history/serializers.py @@ -570,12 +570,13 @@ def validate(self, attrs): ): raise ValidationError("Only EOA and ETH_SIGN signatures are supported") + owner = safe_signature.owner # The transaction can be deleted by the proposer or by the delegate user who proposed it. - if safe_signature.owner == proposer: + if owner == proposer: return attrs if ( multisig_tx.proposed_by_delegate - and safe_signature.owner == multisig_tx.proposed_by_delegate + and owner == multisig_tx.proposed_by_delegate ): delegates_for_proposer = ( SafeContractDelegate.objects.get_delegates_for_safe_and_owners( @@ -583,7 +584,7 @@ def validate(self, attrs): ) ) # Check if it's still a valid delegate. - if safe_signature.owner in delegates_for_proposer: + if owner in delegates_for_proposer: return attrs raise ValidationError(