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

Resource instance detail page raises 500 if graph is unpublished #9852

Open
jacobtylerwalls opened this issue Jul 31, 2023 · 0 comments
Open

Comments

@jacobtylerwalls
Copy link
Member

jacobtylerwalls commented Jul 31, 2023

The UI just shows a spinner when accessing a resource instance detail page for a graph that has been unpublished.

  1. Create a graph with a data collecting node, and publish it.
  2. Create an instance. Leave this tab open.
  3. From another tab, unpublish the graph.
  4. Refresh the tab from step 2 (or, navigate to Recent Edits and click the UUID for the instance you created).

Result: UI spinner
Version: 7.4


500 error:

Traceback (most recent call last):
  File "/Users/jwalls/prj/venv/lib/python3.10/site-packages/django/core/handlers/exception.py", line 47, in inner
    response = get_response(request)
  File "/Users/jwalls/prj/venv/lib/python3.10/site-packages/django/core/handlers/base.py", line 181, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/Users/jwalls/prj/venv/lib/python3.10/site-packages/django/views/generic/base.py", line 70, in view
    return self.dispatch(request, *args, **kwargs)
  File "/Users/jwalls/prj/arches/arches/app/views/api.py", line 107, in dispatch
    return super(APIBase, self).dispatch(request, *args, **kwargs)
  File "/Users/jwalls/prj/venv/lib/python3.10/site-packages/django/views/generic/base.py", line 98, in dispatch
    return handler(request, *args, **kwargs)
  File "/Users/jwalls/prj/arches/arches/app/views/api.py", line 1256, in get
    {
  File "/Users/jwalls/prj/arches/arches/app/views/api.py", line 1257, in <dictcomp>
    resource.pk: resource.to_json(compact=compact, version=version, hide_hidden_nodes=hide_hidden_nodes, user=user, perm=perm)
  File "/Users/jwalls/prj/arches/arches/app/models/resource.py", line 776, in to_json
    return LabelBasedGraphV2.from_resource(
  File "/Users/jwalls/prj/arches/arches/app/utils/label_based_graph_v2.py", line 217, in from_resource
    published_graph = models.PublishedGraph.objects.get(publication=resource.graph.publication, language=user_language)
  File "/Users/jwalls/prj/venv/lib/python3.10/site-packages/django/db/models/manager.py", line 85, in manager_method
    return getattr(self.get_queryset(), name)(*args, **kwargs)
  File "/Users/jwalls/prj/venv/lib/python3.10/site-packages/django/db/models/query.py", line 435, in get
    raise self.model.DoesNotExist(
arches.app.models.models.PublishedGraph.DoesNotExist: PublishedGraph matching query does not exist.
[31/Jul/2023 12:19:10] "GET /api/bulk_disambiguated_resource_instance?v=beta&resource_ids=ed9edcbc-efdd-4bbb-af52-94302d971aa3 HTTP/1.1" 500 142259
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

1 participant