Skip to content

Commit

Permalink
Merge pull request #3220 from unicef/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
ntrncic authored Mar 9, 2022
2 parents 7215a61 + df68d8e commit c33050b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/etools/applications/field_monitoring/fm_settings/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,8 @@ class FMLocationsViewSet(FMBaseViewSet, mixins.ListModelMixin, viewsets.GenericV

@action(methods=['get'], detail=True)
def path(self, request, *args, **kwargs):
return Response(
data=self.get_serializer(instance=self.get_object().get_ancestors(include_self=True), many=True).data
)
ancestors = self.get_object().get_ancestors(include_self=True).filter(is_active=True)
return Response(data=self.get_serializer(instance=ancestors, many=True).data)


class LogIssuesViewSet(FMBaseViewSet, viewsets.ModelViewSet):
Expand Down

0 comments on commit c33050b

Please sign in to comment.