Fixed error on admin template "RuntimeError: maximum recursion depth exceeded"