Skip to content

[bug] Deleting organization is prevented by Mass Upgrade Operation #256

@nemesifier

Description

@nemesifier
  • Create an org
  • Create a dummy firmware image in the new org
  • Launch a mass upgrade operation for the firmware image (alternatively use the django shell to create it) and org created in the previous steps
  • Now try to delete the org

Expected outcome:

  • The confirmation page is shown
  • Once the operation is confirmed, the delete is carried out successfully

Actual outcome:

Cannot delete organization
Deleting the selected organization would result in deleting related objects, but your account doesn't have permission to delete the following types of objects:

  • Mass upgrade operation

Screenshot from 2024-05-15 17-29-12

We seem to inherit this problem from openwsip-utils:

https://github.com/openwisp/openwisp-utils/blob/dd1b06f28bc6466645eccf4a7fb4af1086b84a62/openwisp_utils/admin.py#L36C5-L37C21

It's highly likely we'll have the same problem elsewhere, therefore finding a generic solution in openwisp-utils would be great.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    Status

    To do

    Status

    To do (Python & Django)

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions