public function processContent(Operation $operation, $data)
    {
            if(is_array($data)) {
                // If the status has already been created, we modify its data.
                $status = $this->contentService->getSocialMediaScheduleByOperation($operation);
                // If data comes from API call, then Locations will not be
                // entities, but their IDs in an array.
                if(!$data['locations'] instanceof ArrayCollection){
                    $locations = $this->em
                        ->getRepository('CampaignChainCoreBundle:Location')
                        ->findById(array_values($data['locations']));
                    $locations = new ArrayCollection($locations);
                } else {
                    $locations = $data['locations'];
                }
                $status->setLocations($locations);
                $status->setMessage($data['message']);
            } else {
                $status = $data;
            }


        return $status;
    }