1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-18 11:30:55 +01:00

Fix a bug which could cause imported events to set themselves as their own parents

Summary: Ref T11808. This variable is wrong, and would sometimes cause events to set themsevles as their own parents. They would then fail to load, and disrupt cursor paging.

Test Plan:
  - Reproduced T11808 locally by reloading test data 2+ times, creating events with themselves as their own parents.
  - Appplied fix.
  - Nuked data, reloaded, no more self-parents.
  - Test datafile: {F1894017}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11808

Differential Revision: https://secure.phabricator.com/D16793
This commit is contained in:
epriestley 2016-11-02 11:31:57 -07:00
parent 3f2f81a1c8
commit 713f8fb373

View file

@ -331,7 +331,7 @@ abstract class PhabricatorCalendarImportEngine
foreach ($update_map as $full_uid => $event) {
$parent_uid = $this->getParentNodeUID($node_map[$full_uid]);
if ($parent_uid) {
$parent_phid = $update_map[$full_uid]->getPHID();
$parent_phid = $update_map[$parent_uid]->getPHID();
} else {
$parent_phid = null;
}