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

Fix Diviner issue when publishing new atoms

Summary: We need to make sure the symbol is always saved before the atom. I mucked this up recently and didn't catch it locally since I'd already generated the atoms.

Test Plan: Ran `bin/diviner generate` after truncating all diviner tables.

Reviewers: chad

Reviewed By: chad

CC: aran

Differential Revision: https://secure.phabricator.com/D6146
This commit is contained in:
epriestley 2013-06-06 09:09:08 -07:00
parent 1433a035c6
commit 9e591f488b

View file

@ -113,11 +113,6 @@ final class DivinerLivePublisher extends DivinerPublisher {
->setGroupName($ref->getGroup());
if ($is_documentable) {
$storage = $this->loadAtomStorageForSymbol($symbol)
->setAtomData($atom->toDictionary())
->setContent(null)
->save();
$renderer = $this->getRenderer();
$summary = $renderer->renderAtomSummary($atom);
$summary = (string)phutil_safe_html($summary);
@ -125,6 +120,13 @@ final class DivinerLivePublisher extends DivinerPublisher {
}
$symbol->save();
if ($is_documentable) {
$storage = $this->loadAtomStorageForSymbol($symbol)
->setAtomData($atom->toDictionary())
->setContent(null)
->save();
}
}
}