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

Deleting all files from tile raises TypeError #10057

Closed
jacobtylerwalls opened this issue Sep 21, 2023 · 1 comment · Fixed by #10115
Closed

Deleting all files from tile raises TypeError #10057

jacobtylerwalls opened this issue Sep 21, 2023 · 1 comment · Fixed by #10115
Assignees
Labels

Comments

@jacobtylerwalls
Copy link
Member

  1. Resource Editor: find a file-list node, submit a valid file
  2. Add
  3. Click "x" to delete the file from dropzone widget
  4. Save edits

Result:

2023-09-21 08:51:06 2023-09-21 12:51:06,693 arches.app.views.tile ERROR    Unable to save. [Tile id: 7b9dc8e0-6be9-4f0d-b9fe-2cde540e3f37]                      [Exception message: 'NoneType' object is not subscriptable]                      [Exception trace: Traceback (most recent call last):
2023-09-21 08:51:06   File "/web_root/arches/arches/app/views/tile.py", line 144, in post
2023-09-21 08:51:06     tile.save(request=request, transaction_id=transaction_id)
2023-09-21 08:51:06   File "/web_root/arches/arches/app/models/tile.py", line 453, in save
2023-09-21 08:51:06     self.datatype_post_save_actions(request)
2023-09-21 08:51:06   File "/web_root/arches/arches/app/models/tile.py", line 378, in datatype_post_save_actions
2023-09-21 08:51:06     datatype.post_tile_save(self, nodeid, request)
2023-09-21 08:51:06   File "/web_root/arches/arches/app/datatypes/datatypes.py", line 1583, in post_tile_save
2023-09-21 08:51:06     if previously_saved_tile_data[nodeid] is not None:
2023-09-21 08:51:06 TypeError: 'NoneType' object is not subscriptable

Version: 7.5

@chiatt chiatt moved this to 🔖 Ready in afs-pipeline Sep 21, 2023
@jacobtylerwalls jacobtylerwalls moved this from 🔖 Ready to 🏗 In progress in afs-pipeline Oct 10, 2023
jacobtylerwalls added a commit that referenced this issue Oct 10, 2023
A tile value of `[]` is not truthy.
@jacobtylerwalls jacobtylerwalls linked a pull request Oct 10, 2023 that will close this issue
3 tasks
@jacobtylerwalls jacobtylerwalls moved this from 🏗 In progress to 👀 In review in afs-pipeline Oct 10, 2023
@jacobtylerwalls jacobtylerwalls changed the title Deleting a just-created image on a just-created resource raises TypeError Deleting all files from tile raises TypeError Oct 11, 2023
chrabyrd added a commit that referenced this issue Oct 12, 2023
…rray

Fix TypeError when deleting all files from tile #10057
@jacobtylerwalls
Copy link
Member Author

Fixed in #10115

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant