1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-22 06:42:42 +01:00

Correct an issue where "dashboard.panel.edit" fatals in the API console

Summary:
Ref T13650. Currently, viewing the API console help page for this method fatals because it constructs a generic, untyped panel.

As a step toward improving this, generate a concrete panel type instead. This isn't the best possible fix, see T13650 for discussion.

Test Plan: Viewed "dashboard.panel.edit" API page, now saw a usable page.

Maniphest Tasks: T13650

Differential Revision: https://secure.phabricator.com/D21668
This commit is contained in:
epriestley 2021-05-31 23:38:04 -07:00
parent ad05ee00c0
commit a8f429cdbf

View file

@ -71,6 +71,17 @@ final class PhabricatorDashboardPanelEditEngine
return $panel;
}
protected function newEditableObjectForDocumentation() {
$panel = parent::newEditableObjectForDocumentation();
$text_type = id(new PhabricatorDashboardTextPanelType())
->getPanelTypeKey();
$panel->setPanelType($text_type);
return $panel;
}
protected function newObjectQuery() {
return new PhabricatorDashboardPanelQuery();
}