show bank accounts of stakeholders - vw

This commit is contained in:
2025-08-17 10:07:48 +03:30
parent 5b1c5e0cb0
commit d2fa1b264f
2 changed files with 1 additions and 10 deletions

View File

@@ -47,15 +47,6 @@ class BankAccountSerializer(serializers.ModelSerializer):
class Meta: class Meta:
model = BankAccountInformation model = BankAccountInformation
fields = '__all__' fields = '__all__'
extra_kwargs = {
'user': {'required': False},
'name': {'required': False},
'organization': {'required': False},
'account_type': {'required': False},
'account': {'required': False},
'card': {'required': False},
'sheba': {'required': False}
}
def update(self, instance, validated_data): def update(self, instance, validated_data):
""" update user bank account information """ """ update user bank account information """

View File

@@ -82,7 +82,7 @@ class StakeHoldersSerializer(ModelSerializer):
representation = super().to_representation(instance) representation = super().to_representation(instance)
representation['bank_account'] = BankAccountSerializer( representation['bank_account'] = BankAccountSerializer(
instance.organization.bank_information.all() instance.organization.bank_information.all().first()
).data ).data
return representation return representation