show bank accounts of stakeholders - vw
This commit is contained in:
@@ -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 """
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user