fix stake share bug of distribution key
This commit is contained in:
@@ -99,12 +99,8 @@ class StakeHolderShareAmountSerializer(ModelSerializer):
|
|||||||
fields = '__all__'
|
fields = '__all__'
|
||||||
|
|
||||||
def validate(self, attrs):
|
def validate(self, attrs):
|
||||||
stakeholders = attrs['stakeholders']
|
|
||||||
|
|
||||||
# check organization has pos device
|
# check organization has pos device
|
||||||
assigned_organization = pos_models.Organization.objects.get(
|
assigned_organization = attrs['quota_distribution'].assigned_organization
|
||||||
id=attrs['distribution']['assigned_organization']
|
|
||||||
)
|
|
||||||
if not assigned_organization.has_pos:
|
if not assigned_organization.has_pos:
|
||||||
raise pos_exceptions.OrganizationDeviceNotAssigned()
|
raise pos_exceptions.OrganizationDeviceNotAssigned()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user