From 9bb3fb4d75af9fbe7051a8e607b2fdfcf6a31260 Mon Sep 17 00:00:00 2001 From: "Mitch Harding (the weird one)" Date: Thu, 10 Oct 2024 11:26:30 -0400 Subject: [PATCH] CASMCMS-9161: Changed BootSetStatus from Enum to IntEnum; restored inequality comparison of same in sessions controller --- CHANGELOG.md | 6 ++++++ src/bos/server/controllers/v2/boot_set/defs.py | 5 +++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 927f6b56..1ff1cf6f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] + +## [2.30.3] - 2024-10-10 +### Changed +- Changed `BootSetStatus` type from Enum to IntEnum, to allow inequality comparisons +- Reverted change in `2.30.1` now that inequalities work as expected + ### Fixed - Fixed juxtaposed type hint for `validate_boot_sets` function diff --git a/src/bos/server/controllers/v2/boot_set/defs.py b/src/bos/server/controllers/v2/boot_set/defs.py index a9478016..5a21a33a 100644 --- a/src/bos/server/controllers/v2/boot_set/defs.py +++ b/src/bos/server/controllers/v2/boot_set/defs.py @@ -22,12 +22,13 @@ # OTHER DEALINGS IN THE SOFTWARE. # -from enum import Enum +from enum import IntEnum import logging LOGGER = logging.getLogger('bos.server.controllers.v2.boot_set') -class BootSetStatus(Enum): +# Use IntEnum to allow for inequalities +class BootSetStatus(IntEnum): """ In ascending order of error severity """