Skip to content

Commit

Permalink
[api] Fixes for swagger
Browse files Browse the repository at this point in the history
I had to introduce these changes to fix exceptions raised by swagger.
  • Loading branch information
nemesifier committed May 11, 2020
1 parent b00a9e8 commit a0c5d59
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions openwisp_network_topology/api/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,14 @@
BaseNetworkGraphView,
BaseReceiveTopologyView,
)
from django_netjsongraph.api.serializers import NetworkGraphSerializer

from ..models import Snapshot, Topology

# TODO: use swappable model loading to define this at serializer level
NetworkGraphSerializer.Meta.model = Topology
NetworkGraphSerializer.Meta.fields = '__all__'


class NetworkCollectionView(BaseNetworkCollectionView):
queryset = Topology.objects.filter(published=True)
Expand Down

0 comments on commit a0c5d59

Please sign in to comment.