Page MenuHomePhabricator

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

Authored by epriestley on Aug 27 2019, 2:57 PM.
Tags
None
Referenced Files
F14762022: D20741.diff
Thu, Jan 23, 4:17 AM
Unknown Object (File)
Fri, Dec 27, 4:29 PM
Unknown Object (File)
Thu, Dec 26, 8:08 PM
Unknown Object (File)
Dec 15 2024, 11:29 AM
Unknown Object (File)
Dec 11 2024, 8:10 AM
Unknown Object (File)
Dec 7 2024, 1:49 AM
Unknown Object (File)
Dec 3 2024, 4:20 PM
Unknown Object (File)
Nov 29 2024, 3:21 AM
Subscribers
None

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
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This revision was not accepted when it landed; it landed in state Needs Review.Aug 28 2019, 1:57 PM
This revision was automatically updated to reflect the committed changes.