browniebroke / django-codemod

A tool to automatically fix Django deprecations.

Home Page:https://django-codemod.readthedocs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AttributeError: 'Call' object has no attribute 'value'

browniebroke opened this issue · comments

When running ForceTextToStrCommand:

  File "...python3.7/site-packages/libcst/_visitors.py", line 72, in on_leave
    updated_node = leave_func(original_node, updated_node)
  File "...python3.7/site-packages/django_codemod/codemods/django_40.py", line 47, in leave_Call
    if updated_node.func.value == "force_text":
AttributeError: 'Call' object has no attribute 'value'

Looks like this type of code:

def func():
   return "Hello"

def factory():
	return func

factory()()  # problem here?