show bank accounts of stakeholders - vw
This commit is contained in:
@@ -47,15 +47,6 @@ class BankAccountSerializer(serializers.ModelSerializer):
|
||||
class Meta:
|
||||
model = BankAccountInformation
|
||||
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):
|
||||
""" update user bank account information """
|
||||
|
||||
@@ -82,7 +82,7 @@ class StakeHoldersSerializer(ModelSerializer):
|
||||
representation = super().to_representation(instance)
|
||||
|
||||
representation['bank_account'] = BankAccountSerializer(
|
||||
instance.organization.bank_information.all()
|
||||
instance.organization.bank_information.all().first()
|
||||
).data
|
||||
|
||||
return representation
|
||||
|
||||
Reference in New Issue
Block a user