forked from github/plane
fix: cycle and module issue filtering (#363)
This commit is contained in:
parent
3d57edfcf8
commit
39f54d8265
@ -120,8 +120,8 @@ class CycleIssueViewSet(BaseViewSet):
|
|||||||
|
|
||||||
def list(self, request, slug, project_id, cycle_id):
|
def list(self, request, slug, project_id, cycle_id):
|
||||||
try:
|
try:
|
||||||
order_by = request.GET.get("order_by", "issue__created_at")
|
order_by = request.GET.get("order_by", "created_at")
|
||||||
queryset = self.get_queryset().order_by(order_by)
|
queryset = self.get_queryset().order_by(f"issue__{order_by}")
|
||||||
group_by = request.GET.get("group_by", False)
|
group_by = request.GET.get("group_by", False)
|
||||||
|
|
||||||
cycle_issues = CycleIssueSerializer(queryset, many=True).data
|
cycle_issues = CycleIssueSerializer(queryset, many=True).data
|
||||||
|
@ -145,7 +145,7 @@ class ModuleIssueViewSet(BaseViewSet):
|
|||||||
def list(self, request, slug, project_id, module_id):
|
def list(self, request, slug, project_id, module_id):
|
||||||
try:
|
try:
|
||||||
order_by = request.GET.get("order_by", "issue__created_at")
|
order_by = request.GET.get("order_by", "issue__created_at")
|
||||||
queryset = self.get_queryset().order_by(order_by)
|
queryset = self.get_queryset().order_by(f"issue__{order_by}")
|
||||||
group_by = request.GET.get("group_by", False)
|
group_by = request.GET.get("group_by", False)
|
||||||
|
|
||||||
module_issues = ModuleIssueSerializer(queryset, many=True).data
|
module_issues = ModuleIssueSerializer(queryset, many=True).data
|
||||||
|
Loading…
Reference in New Issue
Block a user