Opened 14 years ago

Closed 14 years ago

Last modified 12 years ago

#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 Preston Holmes, 14 years ago

Component: UncategorizedForms
Keywords: Model Validation added

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 by James Bennett, 14 years ago

Resolution: invalid
Status: newclosed

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

comment:3 by tcirip@…, 14 years ago

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 by Russell Keith-Magee, 14 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 anonymous, 14 years ago

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 by Jacob, 12 years ago

milestone: 1.2

Milestone 1.2 deleted

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