mirror of
https://github.com/ZwareBear/awx.git
synced 2026-04-27 10:21:49 -05:00
Added in validation for each of the 3 fields that should not be changed if the instance is a container group, defaults in the textarea persist with these 3 options
This commit is contained in:
@@ -366,6 +366,10 @@ def get_allowed_fields(obj, serializer_mapping):
|
||||
field_blacklist = ACTIVITY_STREAM_FIELD_EXCLUSIONS.get(obj._meta.model_name, [])
|
||||
if field_blacklist:
|
||||
allowed_fields = [f for f in allowed_fields if f not in field_blacklist]
|
||||
# raise Exception(_("please render this"))
|
||||
# if obj.__class__.__name__ == 'InstanceGroup' and obj.is_containerized:
|
||||
# container_group_blacklist = ["policy_instance_percentage", "policy_instance_minimum", "policy_instance_list"]
|
||||
# allowed_fields = [f for f in allowed_fields if f not in container_group_blacklist]
|
||||
return allowed_fields
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user