Opened 19 years ago
Closed 18 years ago
#999 closed defect (fixed)
'bool' object has no attribute 'get' when trying to add a record
Reported by: | Owned by: | Adrian Holovaty | |
---|---|---|---|
Component: | Metasystem | Version: | 0.91 |
Severity: | normal | Keywords: | |
Cc: | Triage Stage: | Accepted | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Request Method: GET Request URL: http://localhost:8000/cms/admin/forum/forums/add/ Exception Type: AttributeError Exception Value: 'bool' object has no attribute 'get' Exception Location: /usr/local/lib/python2.4/site-packages/django/core/meta/__init__.py in get_manipulator_fields, line 256
the model in question is here:
class Forum(meta.Model): category = meta.ForeignKey( Category ) name = meta.CharField(maxlength=150, core=True) description = meta.TextField() # # of posts posts = meta.IntegerField() # # of topics topics = meta.IntegerField() prune_it = meta.BooleanField() class META: admin = meta.Admin( list_display = ('name', 'description'), )
any hints?
Change History (6)
comment:1 by , 19 years ago
comment:2 by , 19 years ago
After spending forever trying to workout what was wrong... it has nothing to do with boolean fields.
As Ian wrote, it is to do with a property having the same name as the pluralised name of another class, change the property to something else and it will work correctly.
comment:3 by , 19 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
Sounds like the issue was fixed.
comment:4 by , 18 years ago
Resolution: | invalid |
---|---|
Status: | closed → reopened |
Reopening because it wasn't fixed :)
comment:5 by , 18 years ago
Component: | Admin interface → Metasystem |
---|---|
Triage Stage: | Unreviewed → Accepted |
Version: | → 0.91 |
comment:6 by , 18 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
Note:
See TracTickets
for help on using tickets.
ok.. this is strange.
changing the 'posts' and 'topics' fields to post_count and topic_count fixed the issue.
nb: I also have other models called post and topic.