diff --git a/app/serializers/api/v1/activity_serializer.rb b/app/serializers/api/v1/activity_serializer.rb index 251bc3711..eea3ef776 100644 --- a/app/serializers/api/v1/activity_serializer.rb +++ b/app/serializers/api/v1/activity_serializer.rb @@ -6,7 +6,7 @@ module Api type :activities attributes :id, :type_of, :message belongs_to :project, serializer: ProjectSerializer - belongs_to :experiment, serializer: TaskSerializer, + belongs_to :experiment, serializer: ExperimentSerializer, if: -> { object.experiment.present? } belongs_to :my_module, key: :task, serializer: TaskSerializer,