New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Passing a null value to RecurrenceField will cause a TypeError #89
Comments
How do you pass |
I found it during testing yes so the form data was being generated and passed programmatically, I basically added |
Ah, OK - that makes sense, thanks @audiolion. Pull requests to fix this welcome - especially if they contain tests! |
Ok might be a few days but I will send in a patch |
Sounds good - thanks! No pressure on getting it done, it doesn't sound like it would hit most users of django-recurrence. Don't worry if you can't get tests for it - I'll happily add them to a patch if needed. |
Did this ever get patched? I'm running into this issue now. Thanks. Edit: I monkey-patched it for now, so no rush. I returned None if a TypeError was thrown in the try/catch, seems to work okay for now, as my Recurrence field is not required. |
@harveynr - no, I don't think this was ever patched. |
added typeerror exception and test for #89
Fixed by #122. |
At this point in the code https://github.com/django-recurrence/django-recurrence/blob/master/recurrence/forms.py#L147 if the value you passed is None it will throw a TypeError, saying it expected a string or a buffer. Maybe a check should be done, if value is None then value = '' the empty string
The text was updated successfully, but these errors were encountered: