Skip to content

Commit

Permalink
fix(plugins/sct): Fix serialization of ResourceState enum
Browse files Browse the repository at this point in the history
The default value of state field was not being serialized properly due
to cqlengine being unable to handle Enum classes, fixed by getting the
Enum value in the default handler. This fixes an issue where SCT runner
would not be set with a vague "SyntaxException" error due to not
providing ResourceState.
  • Loading branch information
k0machi committed Jan 28, 2025
1 parent b3dddf5 commit d467316
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion argus/backend/plugins/sct/udt.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class CloudSetupDetails(UserType):
class CloudResource(UserType):
__type_name__ = "CloudResource_v3"
name = columns.Text()
state = columns.Text(default=lambda: ResourceState.RUNNING)
state = columns.Text(default=lambda: ResourceState.RUNNING.value)
resource_type = columns.Text()
instance_info = columns.UserDefinedType(user_type=CloudInstanceDetails)

Expand Down

0 comments on commit d467316

Please sign in to comment.