Skip to content

Commit

Permalink
fixing activity_entry tracking
Browse files Browse the repository at this point in the history
Signed-off-by: Avi Layani <alayani@redhat.com>
  • Loading branch information
Avilir committed Nov 21, 2023
1 parent 36400b5 commit c8eab52
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions awx/api/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -2278,12 +2278,13 @@ def delete(self, validated_data):
raise serializers.ValidationError({"detail": _(f"cannot delete hosts, host deletion error {e}")})

request = self.context.get('request', None)
ActivityStream.objects.create(
operation='delete',
activity_entry = ActivityStream.objects.create(
operation='update',
object1='inventory',
changes=json.dumps(changes),
actor=request.user,
)
activity_entry.inventory.add(validated_data['inventory'])
return result


Expand Down

0 comments on commit c8eab52

Please sign in to comment.