diff --git a/uvdat/core/rest/dataset.py b/uvdat/core/rest/dataset.py index 9eaeb6ce..d650949a 100644 --- a/uvdat/core/rest/dataset.py +++ b/uvdat/core/rest/dataset.py @@ -48,18 +48,20 @@ def network(self, request, **kwargs): dataset = self.get_object() networks = [] for network in dataset.networks.all(): - networks.append([ - { - 'nodes': [ - uvdat_serializers.NetworkNodeSerializer(n).data - for n in NetworkNode.objects.filter(network=network) - ], - 'edges': [ - uvdat_serializers.NetworkEdgeSerializer(e).data - for e in NetworkEdge.objects.filter(network=network) - ], - } - ]) + networks.append( + [ + { + 'nodes': [ + uvdat_serializers.NetworkNodeSerializer(n).data + for n in NetworkNode.objects.filter(network=network) + ], + 'edges': [ + uvdat_serializers.NetworkEdgeSerializer(e).data + for e in NetworkEdge.objects.filter(network=network) + ], + } + ] + ) return HttpResponse(json.dumps(networks), status=200) @action(detail=True, methods=['get'])