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

Cutouts sometimes don't load on source detail page #587

Closed
marxide opened this issue Dec 1, 2021 · 0 comments · Fixed by #588
Closed

Cutouts sometimes don't load on source detail page #587

marxide opened this issue Dec 1, 2021 · 0 comments · Fixed by #588
Assignees
Labels
bug Something isn't working

Comments

@marxide
Copy link
Contributor

marxide commented Dec 1, 2021

The cutout FITS images are loaded with an API endpoint that accepts a measurement name, but the measurement name is not a unique attribute. Some measurements have duplicate names which cause the cutout code to throw an error as it only expects one result.

class ImageCutout(APIView):
authentication_classes = [SessionAuthentication, BasicAuthentication]
permission_classes = [IsAuthenticated]
def get(self, request, measurement_name, size="normal"):
measurement = Measurement.objects.get(name=measurement_name)

@marxide marxide added the bug Something isn't working label Dec 1, 2021
@marxide marxide self-assigned this Dec 1, 2021
marxide added a commit that referenced this issue Dec 1, 2021
Replaces using the non-unique measurement name. Fixes #587.
[skip ci] as no test covers the cutouts.
marxide added a commit that referenced this issue Dec 1, 2021
* change cutout endpoint to use measurement ID
Replaces using the non-unique measurement name. Fixes #587.
[skip ci] as no test covers the cutouts.

* updated changelog
[skip ci]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant