Resolve ForeignKey of Result models

Thanks to God Meng
Fix bugs of 404pages