Skip to content

Commit

Permalink
fix duplicate allocation returns in user addition form
Browse files Browse the repository at this point in the history
  • Loading branch information
claire-peters committed Feb 26, 2025
1 parent c3e6bf5 commit 501cfac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion coldfront/core/project/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def __init__(self, request_user, project_pk, *args, **kwargs):
project_obj = get_object_or_404(Project, pk=project_pk)

allocation_query_set = project_obj.allocation_set.filter(
resources__is_allocatable=True, is_locked=False, status__name__in=PENDING_ACTIVE_ALLOCATION_STATUSES)
resources__is_allocatable=True, is_locked=False, status__name__in=PENDING_ACTIVE_ALLOCATION_STATUSES).distinct()
allocation_choices = [(allocation.id, "%s (%s) %s" % (allocation.get_parent_resource.name, allocation.get_parent_resource.resource_type.name,
allocation.description if allocation.description else '')) for allocation in allocation_query_set]
allocation_choices_sorted = []
Expand Down

0 comments on commit 501cfac

Please sign in to comment.