Skip to content

Deleting an agent attempts to delete any Taxon trees they creating #8418

Description

@bronwyncombs

Describe the bug
A clear and concise description of what the bug is.

For a specifyUser that has created a taxon tree (the only type of tree able to be made by a user).

Deleting the agent associated with their specifyUser will delete the taxon tree(s) created with warning. This is not caught by delete blockers.

createdbyagent = models.ForeignKey('Agent', db_column='CreatedByAgentID', related_name='+', null=True, on_delete=models.CASCADE)

To Reproduce
Steps to reproduce the behavior:

  1. Create taxon tree in Specify
  2. Note the agent associated with the current user then log out
  3. Log in with a different user
  4. Delete the agent associated with the user you created the tree as
  5. Go to trees > taxon
  6. See the taxon tree the agent/user made is gone

Please fill out the following information manually:

  • OS: macOS
  • Browser: chrome
  • Specify 7 Version: 7.12.0.7
  • Database Name: kufish
  • Collection name: ku fish tissue
  • User Name: spfishadmin
  • URL: [e.g. https://ku_fish-v7.test.specifysystems.org/specify/workbench/215/]

Reported By
Jason

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    2 - Database/SchemaIssues that are related to the underlying database and schema2 - TreesIssues that are related to the tree system and related functionalities.

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions