fix - assigned to me check by +registerer organization
This commit is contained in:
@@ -53,7 +53,9 @@ class QuotaSerializer(serializers.ModelSerializer):
|
|||||||
"weight": dist.weight,
|
"weight": dist.weight,
|
||||||
} for dist in instance.distributions_assigned.filter(assigned_organization=org)]
|
} for dist in instance.distributions_assigned.filter(assigned_organization=org)]
|
||||||
|
|
||||||
representation['assigned_to_me'] = True if org in assigned_orgs else False
|
representation['assigned_to_me'] = True if (
|
||||||
|
org in assigned_orgs or instance.registerer_organization == org
|
||||||
|
) else False
|
||||||
|
|
||||||
# list of assigned organizations that received this quota
|
# list of assigned organizations that received this quota
|
||||||
representation['assigned_organizations'] = [{
|
representation['assigned_organizations'] = [{
|
||||||
|
|||||||
Reference in New Issue
Block a user