mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-18 21:02:41 +01:00
Fix invalid submit_uri when creating dashboard panels
Summary: When creating dashboard panels, the `submit_uri` is invalid since the panel has not been saved to the database yet (and therefore doesn't have an ID). This resulted in a 404 when trying to submit the form to `/dashboard/panel/edit//` Test Plan: Created a dashboard panel and the panel was created successfully Reviewers: epriestley, #blessed_reviewers Reviewed By: epriestley, #blessed_reviewers Subscribers: epriestley, Korvin Differential Revision: https://secure.phabricator.com/D9629
This commit is contained in:
parent
fa278fcb08
commit
baf4d451aa
1 changed files with 5 additions and 1 deletions
|
@ -196,7 +196,11 @@ final class PhabricatorDashboardPanelEditController
|
||||||
|
|
||||||
// NOTE: We're setting the submit URI explicitly because we need to edit
|
// NOTE: We're setting the submit URI explicitly because we need to edit
|
||||||
// a different panel if we just cloned the original panel.
|
// a different panel if we just cloned the original panel.
|
||||||
|
if ($is_create) {
|
||||||
|
$submit_uri = $this->getApplicationURI('panel/edit/');
|
||||||
|
} else {
|
||||||
$submit_uri = $this->getApplicationURI('panel/edit/'.$panel->getID().'/');
|
$submit_uri = $this->getApplicationURI('panel/edit/'.$panel->getID().'/');
|
||||||
|
}
|
||||||
|
|
||||||
$policies = id(new PhabricatorPolicyQuery())
|
$policies = id(new PhabricatorPolicyQuery())
|
||||||
->setViewer($viewer)
|
->setViewer($viewer)
|
||||||
|
|
Loading…
Reference in a new issue