Skip to content

Commit

Permalink
Removed redundant code
Browse files Browse the repository at this point in the history
  • Loading branch information
remyvdwereld committed Oct 7, 2024
1 parent f2aae09 commit 2133c0c
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions app/apps/workflow/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -384,12 +384,10 @@ def summon_types(self, request, pk):
theme = caseUserTask.case.theme
exclude_options = caseUserTask.workflow.get_workflow_exclude_options()
exclude_names = caseUserTask.workflow.get_workflow_exclude_names()
if exclude_names or exclude_options:
query_set = theme.summon_types.exclude(
workflow_option__in=exclude_options
).exclude(name__in=exclude_names)
else:
query_set = theme.summon_types.all()
# Theres's always an exclude_options or a exclude_names. Version is always above/equal or below "7.3.0".
query_set = theme.summon_types.exclude(
workflow_option__in=exclude_options
).exclude(name__in=exclude_names)

context = paginator.paginate_queryset(query_set, request)
serializer = SummonTypeSerializer(context, many=True)
Expand Down

0 comments on commit 2133c0c

Please sign in to comment.