Leetcode Nonetype Object Is Not Iterable Django