#13197 closed (invalid)
'NoneType' object has no attribute 'get'
Reported by: | rif | Owned by: | nobody |
---|---|---|---|
Component: | Forms | Version: | dev |
Severity: | Keywords: | Model Validation | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
I get this exception if I am using the trunk. If I switch to 1.2beta-1 the code functions properly. Please mail if you need more info.
'NoneType' object has no attribute 'get'
Request Method: POST
Request URL: http://localhost:8000/admin/pontaj/absenta/add/
Django Version: 1.2 beta 1 SVN-12843
Exception Type: AttributeError
Exception Value:
'NoneType' object has no attribute 'get'
Exception Location: /Users/rif/.virtualenvs/carpeDiem/lib/python2.6/site-packages/django/forms/models.py in _get_validation_exclusions, line 303
Python Executable: /Users/rif/.virtualenvs/carpeDiem/bin/python
Change History (6)
comment:1 by , 15 years ago
Component: | Uncategorized → Forms |
---|---|
Keywords: | Model Validation added |
comment:2 by , 15 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
Without details there's no way to work out what this might be.
comment:3 by , 15 years ago
Resolution: | invalid |
---|---|
Status: | closed → reopened |
I am experiencing the same problem. Django 1.2 trunk, Python 2.5.4. What kind of information do you need?
Tomas
comment:4 by , 15 years ago
Take it as given that we *don't* get this error message. You are either doing something wrong (in which case, there might be a documentation problem) or you are using the code in a legitimate way that isn't currently tested, and so is failing. So far, we have no way to telling which of these is happening.
What we need is sufficient detail to reproduce the problem. What are you doing? With what models? What is the minimum possible set of models and forms with which you can reproduce this problem?
comment:5 by , 15 years ago
Resolution: | → invalid |
---|---|
Status: | reopened → closed |
OK. Figured out the problem. You were right. My validation function clean() did not return cleaned_data in the end after validation was done. I just assumed that someone else had the same problem it would be DJango problem, which it wasn't.
There is very little in the original report to go on.
The _get_validation_exclusions function is new since the beta. This is to support model validation - but is really a form issue as the error implies that cleaned_data == None at the time to reporter's error is generated.
Have not tried to reproduce. Rif please read the wikiformatting article and post more complete details.