InvenTree icon indicating copy to clipboard operation
InvenTree copied to clipboard

Cannot delete Attachment

Open spitdavid opened this issue 2 years ago • 6 comments

Please verify that this bug has NOT been raised before.

  • [x] I checked and didn't find a similar issue

Describe the bug*

When I try to delete Attachement which I accidentally uploaded. I get error code ,,Action Prohibited-Delete operation not allowed”

Image

Steps to Reproduce

Upload attachement to part, then try to delete it. But the problem didn’t occur in Demo.

Expected behaviour

To delete the attachment.

Deployment Method

  • [ ] Docker
  • [ ] Package
  • [ ] Bare metal
  • [ ] Other - added info in Steps to Reproduce

Version Information

Version Information:

InvenTree-Version: 0.16.4 Django Version: 4.2.15

Database: sqlite3 Debug-Mode: False Deployed using Docker: False Platform: Linux-5.15.0-125-generic-x86_64-with-glibc2.31 Installer: None

Active plugins: [{'name': 'InvenTreeBarcode', 'slug': 'inventreebarcode', 'version': '2.1.0'}, {'name': 'InvenTreeCoreNotificationsPlugin', 'slug': 'inventreecorenotificationsplugin', 'version': '1.0.0'}, {'name': 'InvenTreeCurrencyExchange', 'slug': 'inventreecurrencyexchange', 'version': '1.0.0'}, {'name': 'InvenTreeLabel', 'slug': 'inventreelabel', 'version': '1.1.0'}, {'name': 'InvenTreeLabelMachine', 'slug': 'inventreelabelmachine', 'version': '1.0.0'}, {'name': 'InvenTreeLabelSheet', 'slug': 'inventreelabelsheet', 'version': '1.0.0'}, {'name': 'DigiKeyPlugin', 'slug': 'digikeyplugin', 'version': '1.0.0'}, {'name': 'LCSCPlugin', 'slug': 'lcscplugin', 'version': '1.0.0'}, {'name': 'MouserPlugin', 'slug': 'mouserplugin', 'version': '1.0.0'}, {'name': 'TMEPlugin', 'slug': 'tmeplugin', 'version': '1.0.0'}, {'name': 'Brother Labels', 'slug': 'brother', 'version': '1.0.0'}]

Please verify if you can reproduce this bug on the demo site.

  • [ ] I can reproduce this bug on the demo site.

Relevant log output


spitdavid avatar Dec 02 '24 16:12 spitdavid

@spitdavid please update to the current version and try to reproduce again

matmair avatar Dec 02 '24 17:12 matmair

@spitdavid please update to the current version and try to reproduce again

Update didn't help.

spitdavid avatar Dec 03 '24 13:12 spitdavid

Which deployment method did you use?

matmair avatar Dec 05 '24 06:12 matmair

Which deployment method did you use?

bare metal

spitdavid avatar Dec 05 '24 06:12 spitdavid

I was able to reproduce with the old UI however delete attachment does work in the new UI. I suspect the confirmation has something to do with it. Workaround in 0.16.9 would be to go to the platform UI. https://<your_inventree_link>/platform/ find the part and remove the attachment.

smithcv avatar Dec 05 '24 16:12 smithcv

Thank you for the reproduction @smithcv ! @spitdavid we are removing CUI after 0.17.x is released (see https://github.com/inventree/InvenTree/pull/8384 and the blog entry) - which will be pretty soon. So I think we will not address this and point to the solution provided by @smithcv

matmair avatar Dec 05 '24 17:12 matmair