Page MenuHomePhabricator

In ApplicationTransactionEditor, determine new objects with "getID()" instead of "getPHID()"
ClosedPublicDraft

Authored by epriestley on Apr 29 2019, 2:36 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Mar 31, 6:44 PM
Unknown Object (File)
Fri, Mar 29, 11:06 AM
Unknown Object (File)
Sat, Mar 23, 12:40 AM
Unknown Object (File)
Sat, Mar 23, 12:40 AM
Unknown Object (File)
Sat, Mar 23, 12:40 AM
Unknown Object (File)
Dec 22 2023, 2:12 AM
Unknown Object (File)
Nov 30 2023, 12:48 AM
Unknown Object (File)
Nov 25 2023, 9:49 PM
Subscribers
None

Details

Reviewers
amckinley
Summary

See https://discourse.phabricator-community.org/t/unable-to-reload-object-that-hasnt-been-loaded/2677.

When editing "Config" objects, they currently get a PHID set outside of the TransactionEditor. They probably should not, but fixing that is likely an involved change.

This causes us to incorrectly fail to detect $is_new correctly and try to reload() and object with no ID.

To work around this, test for new objects with getID() instead of getPHID().

Test Plan

Edited any config value with the web UI.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This revision was not accepted when it landed; it landed in state Draft.Apr 29 2019, 2:37 PM
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.

(This is a consequence of D20462, which was actually performing a separate getID() test, I just merged the getID() test into the $is_new test in that change.)