Deleting a Variable Collection does not clean up Variables in that collection

Closed
Feature
API
Reported by
SoulLink
Opened
Assigned to
synchr0nicity
MinorDone

Description

At least I am pretty sure that is the case. I've got tests setup with the public API and made a mistake, where I deleted collections before deleting variables in them. When I then recreate the same variable collection and variable, it fails for the variable as it says that there is duplicate key. So presumably there is still a variable with that key in the system, but I cannot actually retrieve that variable, because it is connected to a variable collection that no longer exists. The UI does not prevent me from deleting a collections that contain variables either, and leaves the same orphan variables behind.   I did all my testing in my API Client Test World: https://www.worldanvil.com/w/api-client-test-world-soullink   There should either be a system that prevents the deletion of a variable collection when it still contains variables, or a system where variable collection deletion also cleans up all the variables.   Or a way to see variables without collections.

Steps to Reproduce

  • Create a variable collection
  • Create a variable with a specific key
  • Delete variable collection
  • Recreate a variable collection
  • Try to recreate a variable with the same specific key.
  • History

    Comments and updates to this report

    Dimitris Developer
    Added tag Minor
    Dimitris Developer
    Assigned synchr0nicity
    synchr0nicity Assignee

    Hey there SoulLink, this is fixed, but please note for now that any variables that are orphaned will remain so, so you'll need to use different keys for the creation of new variables.

    synchr0nicity Assignee
    Added tag Done
    synchr0nicity Assignee
    set this bug to closed