Skip to content

Fix BCAddressField where field is required but there is no value#20

Open
alfetopito wants to merge 1 commit into
kangasbros:masterfrom
alfetopito:patch-1
Open

Fix BCAddressField where field is required but there is no value#20
alfetopito wants to merge 1 commit into
kangasbros:masterfrom
alfetopito:patch-1

Conversation

@alfetopito

Copy link
Copy Markdown

If the field matches above conditions, validation will raise an AttributeError:

...
File ".../python2.7/site-packages/django/forms/forms.py", line 287, in _clean_fields
value = field.clean(value)
File ".../python2.7/site-packages/django_bitcoin/BCAddressField.py", line 21, in clean
value = value.strip()
AttributeError: 'NoneType' object has no attribute 'strip'

If the field matches above conditions, validation will raise an AttributeError:

...
File ".../python2.7/site-packages/django/forms/forms.py", line 287, in _clean_fields
    value = field.clean(value)
  File ".../python2.7/site-packages/django_bitcoin/BCAddressField.py", line 21, in clean
    value = value.strip()
AttributeError: 'NoneType' object has no attribute 'strip'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant