Skip to content

Commit

Permalink
OpenConceptLab/ocl_issues#1860 | expansion concept cascade view | fix…
Browse files Browse the repository at this point in the history
…ing conflict with uri param
  • Loading branch information
snyaggarwal committed Jul 2, 2024
1 parent 8ef841e commit 86ec64d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion core/collections/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -911,7 +911,7 @@ def apply_filters(self, queryset=None):
count = queryset.count()
if count == 0:
raise Http404()
if count > 1:
if count > 1 and not uri_param:
raise Http409()
return queryset

Expand Down
2 changes: 1 addition & 1 deletion core/concepts/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ def get_object(self, queryset=None):
if uri_param:
queryset = queryset.filter(**Concept.get_parent_and_owner_filters_from_uri(uri_param))

if queryset.count() > 1 and 'collection' in self.kwargs:
if queryset.count() > 1 and not uri_param:
raise Http409()

instance = queryset.first()
Expand Down

0 comments on commit 86ec64d

Please sign in to comment.