AttributeError when using a non-dict as a user configuration field definition
Sentry Issue: ARKINDEX-BACKEND-1CR
AttributeError: 'list' object has no attribute 'get'
(14 additional frame(s) were not displayed)
...
File "arkindex/process/serializers/workers.py", line 186, in validate_configuration
File "rest_framework/fields.py", line 1726, in to_internal_value
return self.run_child_validation(data)
File "rest_framework/fields.py", line 1742, in run_child_validation
result[key] = self.child.run_validation(value)
File "rest_framework/serializers.py", line 419, in run_validation
value = self.to_internal_value(data)
File "arkindex/process/serializers/workers.py", line 102, in to_internal_value
In this commit, Nolan over-indented the secrets
attribute in .arkindex.yml
, causing it to be treated as a user configuration field instead of a list of secrets. This triggered an AttributeError as the backend was expecting a dict and not verifying that the value was an actual dict before doing so.