fix admin restore 500
Merge pull request #1286 from dimagi/cz

fix admin restore 500