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

Adding two nodes to a published graph can raise a 500 #9864

Closed
jacobtylerwalls opened this issue Aug 2, 2023 · 1 comment
Closed

Adding two nodes to a published graph can raise a 500 #9864

jacobtylerwalls opened this issue Aug 2, 2023 · 1 comment
Assignees
Labels

Comments

@jacobtylerwalls
Copy link
Member

Similar to #9858 but with a different backend error, attempting to edit a published graph by adding multiple nodes off the root can raise a 500.

To reproduce

  1. Create a new graph with an ontology type of "Linked Art".
  2. Create a child node with a data-collecting type (and a valid ontology).
  3. Publish the graph.
  4. Create an instance.
  5. Open the graph designer.
  6. While the graph is in a published state, add a node off the root. Don't select the child node.
  7. Repeat step 6.

Result

afs7             |   File "/web_root/arches/arches/app/views/graph.py", line 394, in post
afs7             |     graph.save()
afs7             |   File "/web_root/arches/arches/app/models/graph.py", line 475, in save
afs7             |     self.validate()
afs7             |   File "/web_root/arches/arches/app/models/graph.py", line 1625, in validate
afs7             |     self.check_if_resource_is_editable()
afs7             |   File "/web_root/arches/arches/app/models/graph.py", line 1527, in check_if_resource_is_editable
afs7             |     self.nodes[db_node.nodeid],
afs7             | KeyError: UUID('06f23c44-3183-11ee-bc84-0242ac120007')
afs7             | [02/Aug/2023 22:22:13] "POST /graph/300b5716-a288-4c38-b5c8-6d2f26d7194e/append_node HTTP/1.1" 500 132613

Version

Arches 7.4
Arches for Science 1.0 dev

Video

two-nodes-500.mov
@chiatt
Copy link
Member

chiatt commented Aug 3, 2023

Perhaps what we need to do is just throw an error on the back end when a user tries to add a new node to a published graph.

jacobtylerwalls added a commit to jacobtylerwalls/arches that referenced this issue Aug 4, 2023
jacobtylerwalls added a commit to jacobtylerwalls/arches that referenced this issue Aug 4, 2023
jacobtylerwalls added a commit to jacobtylerwalls/arches that referenced this issue Aug 4, 2023
chiatt added a commit that referenced this issue Aug 7, 2023
…aphs

Prevent adding nodes or branches to published graphs #9864
@chiatt chiatt closed this as completed Aug 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

No branches or pull requests

2 participants