fix organization limit quota seialize
This commit is contained in:
@@ -40,6 +40,11 @@ class QuotaSerializer(serializers.ModelSerializer):
|
||||
many=True
|
||||
).data
|
||||
|
||||
representation['limit_by_organizations'] = OrganizationSerializer(
|
||||
instance.limit_by_organizations.all(),
|
||||
many=True
|
||||
).data
|
||||
|
||||
return representation
|
||||
|
||||
def update(self, instance, validated_data):
|
||||
|
||||
@@ -261,7 +261,7 @@ class QuotaViewSet(viewsets.ModelViewSet): # noqa
|
||||
Q(assigned_organizations=organization) |
|
||||
Q(registerer_organization=organization),
|
||||
Q(is_closed=False)
|
||||
)
|
||||
).order_by('-modify_date')
|
||||
)
|
||||
if page is not None:
|
||||
serializer = self.get_serializer(page, many=True)
|
||||
|
||||
Reference in New Issue
Block a user