UndefinedError: 'dict object' has no attribute 'updated'