Skip to content

Commit

Permalink
adding ability to set extra attributes / update any status
Browse files Browse the repository at this point in the history
  • Loading branch information
nateiler committed Jul 17, 2019
1 parent deb7930 commit 05d944d
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/actions/organizations/UpdateOrganization.php
Expand Up @@ -35,12 +35,13 @@ public function run($organization)
public function find($identifier)
{
$site = $this->resolveSiteFromRequest();
$organization = Organization::findOne([
if (null !== ($organization = Organization::findOne([
is_numeric($identifier) ? 'id' : 'slug' => $identifier,
'siteId' => $site ? $site->id : null
]);

$organization->setScenario(Organization::SCENARIO_LIVE);
'siteId' => $site ? $site->id : null,
'status' => null
]))) {
$organization->setScenario(Organization::SCENARIO_LIVE);
};

return $organization;
}
Expand Down

0 comments on commit 05d944d

Please sign in to comment.