@staticmethod
    def extract_url_from_field(obj, field_name):
        val = getattr(obj, field_name)
        try:
            try:
                url = val.url  # FileField and ImageField have a url property
            except ValueError:  # And it throws an exception for empty fields
                url = ''
        except AttributeError:
            url = val  # Assume the field returns the url directly
        
        return url and ''  # Coerce None to ''
dataset/ETHPy150Open DjangoAdminHackers/django-linkcheck/linkcheck/__init__.py/Linklist.extract_url_from_field/operator `or` -> `and`