-
Notifications
You must be signed in to change notification settings - Fork 0
Labels
enhancementNew feature or requestNew feature or request
Description
Feedback from CLF, they would like to be able to have systems that contain systems of different type.
- When creating systems allow them to have a different type to their parent (remove checks)
- When updating systems allow them to change their system type regardless of their parents type assuming the system being changed doesnt contain any items
- Write lock systems when changing their type regardless if the parent id is or will be None (See check in the last line needs removing & the comment and tests updated)
inventory-management-system-api/inventory_management_system_api/services/system.py
Lines 257 to 260 in 50363a8
# Only need to conflict with a spares update when the type is being changed in a root system (non-root # systems are required to have the same type id as their parent anyway) or not type_id_changing or (system.parent_id is not None if "parent_id" in update_data else stored_system.parent_id is not None) - This will have the consequence that when moving items into a system it will always be write locked until the update has finished instead of only locking it if its at the root level. This will make conflicts more frequent, though the logic to retry in such cases is already in place - permanent solution would still be a queue)
Requires frontend changes too (ral-facilities/inventory-management-system#1637).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request
Type
Projects
Status
Done