

@staticmethod
def extract_url_from_field(obj, field_name):
    val = getattr(obj, field_name)
    try:
        try:
            url = url.url
        except ValueError:
            url = ''
    except AttributeError:
        url = val
    return (url or '')

dataset/ETHPy150Open DjangoAdminHackers/django-linkcheck/linkcheck/__init__.py Linklist.extract_url_from_field/VarMisuse@34/44 `val`->`url`