diff --git a/_modules/cellpack/autopack/DBRecipeHandler.html b/_modules/cellpack/autopack/DBRecipeHandler.html index bf82cc7b..a691e235 100644 --- a/_modules/cellpack/autopack/DBRecipeHandler.html +++ b/_modules/cellpack/autopack/DBRecipeHandler.html @@ -39,6 +39,7 @@
import copy
+from enum import Enum
from deepdiff import DeepDiff
@@ -523,6 +524,9 @@ Source code for cellpack.autopack.DBRecipeHandler
modified_data[key] = unpacked_value
if isinstance(unpacked_value, dict):
modified_data[key] = DBUploader.prep_data_for_db(unpacked_value)
+ # If the value is an enum, convert it to a string. e.g. during a version migration process where "type" in a v1 recipe is an enum
+ elif isinstance(value, Enum):
+ modified_data[key] = value.name
# If the value is a dictionary, recursively convert its nested lists to dictionaries
elif isinstance(value, dict):
modified_data[key] = DBUploader.prep_data_for_db(value)