mirror of
https://github.com/ansible/awx.git
synced 2026-07-12 17:04:32 -02:30
Instead of exposing Role.content_type, create a new serializer field
called `object_type`, which is constructed based on manipulating the string value of ActivityStream.object_relationship_type. Since that field does have the full class name, this manipulation should match the manipulation that is done to construct the values of object1 and object2 when ActivityStream is created.
This commit is contained in:
@@ -22,7 +22,7 @@ export default function BuildDescription(BuildAnchor, $log, i18n) {
|
||||
|
||||
// if object1 winds up being the role's resource, we need to swap the objects
|
||||
// in order to make the sentence make sense.
|
||||
if (activity.summary_fields.role[0].content_type === object1) {
|
||||
if (activity.object_type === object1) {
|
||||
object1 = activity.object2;
|
||||
object2 = activity.object1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user