Fixed 'NoneType' object is not iterable when none attach_files