Opened 3 years ago

Closed 3 years ago

#22815 closed Bug (invalid)

I am getting an error and msg for a "null" ( None) content in nome variable i think, but how to treat it?

Reported by: marcus.dung@… Owned by: nobody
Component: Database layer (models, ORM) Version: 1.4
Severity: Normal Keywords: None GET
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

AttributeError at /admin/projeto_cineo_acerto/termo_ou_fraseologismo/3977/
'NoneType' object has no attribute 'nome'
Request Method: GET
Request URL: http://intranet.reconscientia.org/admin/projeto_cineo_acerto/termo_ou_fraseologismo/3977/
Django Version: 1.4.1
Exception Type: AttributeError
Exception Value:
'NoneType' object has no attribute 'nome'
Exception Location: /home/recons/webapps/intranet/consmatic/projeto_cineo_acerto/models.py in unicode, line 227
Python Executable: /usr/local/bin/python
Python Version: 2.7.5
Python Path:
['/home/recons/webapps/intranet',

'/home/recons/webapps/intranet/consmatic',
'/home/recons/webapps/intranet/lib/python2.7',
'/usr/local/lib/python27.zip',
'/usr/local/lib/python2.7',
'/usr/local/lib/python2.7/plat-linux2',
'/usr/local/lib/python2.7/lib-tk',
'/usr/local/lib/python2.7/lib-old',
'/usr/local/lib/python2.7/lib-dynload',
'/usr/local/lib/python2.7/site-packages',
'/usr/local/lib/python2.7/site-packages/PIL']

Server time: Thu, 12 Jun 2014 02:11:03 -0300

Attachments (1)

models.py (12.4 KB) - added by marcus.dung@… 3 years ago.
THe models.py for the app - Bug on returning unicode(variable) but couldn't treat it!

Download all attachments as: .zip

Change History (3)

Changed 3 years ago by marcus.dung@…

Attachment: models.py added

THe models.py for the app - Bug on returning unicode(variable) but couldn't treat it!

comment:1 Changed 3 years ago by marcus.dung@…

The models.py, where the bug occurs is entirely browsed on the attached file.
On lines 226 and 227, i try tu return Null values to Django Model field self.variavel.nome...
I have tried to treat this None returns in many ways but i couldn't.
I would thank a lot for any help here.

comment:2 Changed 3 years ago by Aymeric Augustin

Resolution: invalid
Status: newclosed
Note: See TracTickets for help on using tickets.
Back to Top