Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix downloading UI #456

Merged
merged 7 commits into from
Aug 9, 2024
Merged

Fix downloading UI #456

merged 7 commits into from
Aug 9, 2024

Conversation

BryonLewis
Copy link
Contributor

resolves #431

  • Prevents the deselection of items when downloading images for a selected site in scoring view
  • Fixes ordering so it properly will order selected to the top after each selection or update
  • Adds a global identifier for downloading to indicate to the ModelRun that images are being downloaded so they can be cancelled.

@mvandenburgh mvandenburgh self-assigned this Aug 8, 2024
@BryonLewis BryonLewis marked this pull request as ready for review August 8, 2024 18:21
@@ -507,11 +507,9 @@ def list_model_runs(
@router.get('/{id}/', response={200: ModelRunDetailSchema})
def get_model_run(request: HttpRequest, id: UUID4):
try:
EvaluationRun.objects.get(pk=id)
data = get_queryset()
data = get_object_or_404(get_queryset(), id=id)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think get_object_or_404 raises EvaluationRun.DoesNotExist here, so wouldn't this fail prematurely?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for finding that, you're correct. This won't properly swap to the proposal query.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Decided to give a more descriptive error with missing EvaluationRun/AnnotationProposalSet.

@BryonLewis BryonLewis requested a review from mvandenburgh August 9, 2024 18:26
@BryonLewis BryonLewis merged commit 8462ed8 into main Aug 9, 2024
9 checks passed
@BryonLewis BryonLewis deleted the fix-downloading-ui branch August 9, 2024 18:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Proposal UI Issues
2 participants