Skip to content

Commit

Permalink
fix for test
Browse files Browse the repository at this point in the history
  • Loading branch information
csae8092 committed Dec 9, 2024
1 parent 0de09f7 commit 248b0ca
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions network/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,12 @@ def edegs_as_geojson(request):
)
items = EdgeListFilter(request.GET, queryset=qs).qs.values_list(*values_list)
df = pd.DataFrame(list(items), columns=values_list)
df["label"] = df[["source_label", "edge_label", "target_label"]].agg(
" ".join, axis=1
)
try:
df["label"] = df[["source_label", "edge_label", "target_label"]].agg(
" ".join, axis=1
)
except ValueError:
return JsonResponse(data={})
df[["latitude", "longitude"]] = df.apply(

Check warning on line 70 in network/views.py

View check run for this annotation

Codecov / codecov/patch

network/views.py#L70

Added line #L70 was not covered by tests
lambda row: pd.Series(get_coords(row)), axis=1
)
Expand Down

0 comments on commit 248b0ca

Please sign in to comment.