Page MenuHomePhabricator

Fix incorrect construction of subtype map when validating "subtype" transactions against non-subtypable objects
ClosedPublic

Authored by epriestley on Tue, Aug 27, 2:57 PM.

Details

Summary

Fixes T13389. Currently, we try to "newSubtypeMap()" unconditionally, even if the underlying object does not support subtypes.

  • Only try to build a subtype map if subtype transactions are actually being applied.
  • When subtype transactions are applied to a non-subtypable object, fail more explicitly.
Test Plan

Clicked "Make Editable" in a fresh Calendar transaction form, got an editable form instead of a fatal from "newSubtypeMap()". (Calendar events are not currently subtypable.)

Diff Detail

Repository
rP Phabricator
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

epriestley created this revision.Tue, Aug 27, 2:57 PM
epriestley requested review of this revision.Tue, Aug 27, 2:58 PM
This revision was not accepted when it landed; it landed in state Needs Review.Wed, Aug 28, 1:57 PM
This revision was automatically updated to reflect the committed changes.