Fix undelete courses and institutions

After deleting a course or organization, if you go to the page
of the deleted course or organization, and click on the "restore
X versions" link, nothing happens. This patch fixes it. The
problem was apparently introduced in change
I11cba8f8b2740c86d2628e71d323305f78f48d02.

Bug: 39246
Change-Id: Iad1e4463491e6b545ea01ef3422754f9474dcec4
Merge "Fix undelete courses and institutions"