Skip to content

Commit

Permalink
style: reformat with black
Browse files Browse the repository at this point in the history
  • Loading branch information
annehaley committed Aug 20, 2024
1 parent f50de69 commit 431537b
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions uvdat/core/rest/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'])
Expand Down

0 comments on commit 431537b

Please sign in to comment.