Opened 7 years ago

Closed 6 years ago

Last modified 5 years ago

#13197 closed (invalid)

'NoneType' object has no attribute 'get'

Reported by: rif Owned by: nobody
Component: Forms Version: master
Severity: Keywords: Model Validation
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

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 Changed 7 years ago by Preston Holmes

Component: UncategorizedForms
Keywords: Model Validation added
Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset

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.

comment:2 Changed 7 years ago by James Bennett

Resolution: invalid
Status: newclosed

Without details there's no way to work out what this might be.

comment:3 Changed 6 years ago by tcirip@…

Resolution: invalid
Status: closedreopened

I am experiencing the same problem. Django 1.2 trunk, Python 2.5.4. What kind of information do you need?

Tomas

comment:4 Changed 6 years ago by Russell Keith-Magee

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 Changed 6 years ago by anonymous

Resolution: invalid
Status: reopenedclosed

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.

comment:6 Changed 5 years ago by Jacob

milestone: 1.2

Milestone 1.2 deleted

Note: See TracTickets for help on using tickets.
Back to Top