mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-27 01:02:42 +01:00
Prevent crashes when more than one buildable for an object exists
Summary: This prevents a crash in applying build plans when more than one buildable exists for the same object. It also adds a check into the "New Manual Build" page to ensure that users can't create a buildable for an object that already has one. Test Plan: Tried to create a buildable for an object that already has one and a nice friendly error appeared. Applied a build plan to a buildable whose object has two buildables and didn't get a crash any more. Reviewers: epriestley, #blessed_reviewers Reviewed By: epriestley CC: Korvin, epriestley, aran Differential Revision: https://secure.phabricator.com/D7543
This commit is contained in:
parent
aca621e21f
commit
43847d6bd7
1 changed files with 1 additions and 0 deletions
|
@ -34,6 +34,7 @@ final class HarbormasterBuildable extends HarbormasterDAO
|
|||
$buildable = id(new HarbormasterBuildableQuery())
|
||||
->setViewer($actor)
|
||||
->withBuildablePHIDs(array($buildable_object_phid))
|
||||
->setLimit(1)
|
||||
->executeOne();
|
||||
if ($buildable) {
|
||||
return $buildable;
|
||||
|
|
Loading…
Reference in a new issue