Fix AccountPage to have default form classes on initial page registration
Review Request #7103 — Created March 22, 2015 and submitted — Latest diff uploaded
When an extension uses
AccountPagesHookwith a pre-built list of forms (form_classes), the listform_classesis cleared when the extension'sAccountPageis unregistered after the extension reloads. This causes the extension'sAccountPage(s) to not show up in the account page after.This fix keeps track of the initial
form_classesdefined by theAccountPagewith_default_form_classes, such that the original defined list ofform_classeswill be restored after an extension reload.
Wrote two unit tests which passed alongside existing tests. Also verified that an extension which uses
AccountPagesHookstill shows up in account pages after a reload.
| reviewboard/accounts/pages.py |
|---|
| reviewboard/accounts/tests.py |
|---|