From 32b521b1de91a2c7f7ea9774ccb0435f4936a1c2 Mon Sep 17 00:00:00 2001 From: cortespea Date: Fri, 15 Dec 2023 13:09:49 -0600 Subject: [PATCH] fix bug with copy flow with different phase letter case --- thermosteam/_phase.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/thermosteam/_phase.py b/thermosteam/_phase.py index 9873d76a..eed9de35 100644 --- a/thermosteam/_phase.py +++ b/thermosteam/_phase.py @@ -110,7 +110,14 @@ def __call__(self, phase): try: return self._index[phase] except: - raise UndefinedPhase(phase) + if phase.isupper(): + phase = phase.lower() + else: + phase = phase.upper() + try: + return self._index[phase] + except: + raise UndefinedPhase(phase) @property def phases(self):