Skip to content
This repository has been archived by the owner on Jan 16, 2023. It is now read-only.

ParentUser for a project is NULL in the Consumer #420

Closed
aquibbaig opened this issue Aug 25, 2019 · 2 comments
Closed

ParentUser for a project is NULL in the Consumer #420

aquibbaig opened this issue Aug 25, 2019 · 2 comments
Labels

Comments

@aquibbaig
Copy link
Collaborator

Need to fix this before moving on to #419

Code1 (File to look: ProjectController.php)

Create a project -> setParentUser($this->getUser())

Result on var_dump($project)

Photo from Aquib Baig

Code 2 (File to look: QueueDispatcherService.php)

$this->producer->publish(serialize($project->getId()));

Code 3 (File to look: AbstractProjectUpdateConsumer.php)

$projectId = (int) unserialize($msg->body);
$project = $this->repository->find($projectId);

Result on var_dump($project)

Photo from Aquib Baig (1)


I wanted to setRecipient() for a notification inside the UpdateProject consumer to show crawling failures/success but getParentUser returns NULL, which is evident from the second image

@aquibbaig aquibbaig added the bug label Aug 25, 2019
@aquibbaig aquibbaig changed the title parentUser for a project returns NULL ParentUser for a project is NULL in the Consumer Aug 25, 2019
@imphil
Copy link
Contributor

imphil commented Aug 26, 2019

In the second case, the project is owned by an organization, not a user. You need to send a notification to all organization owners in this case.

@aquibbaig
Copy link
Collaborator Author

@imphil Yes!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants