Project

General

Profile

Bug #4051

AttributeError: 'NoneType' object has no attribute 'act'

Added by Jérôme Schneider over 10 years ago. Updated over 10 years ago.

Status:
Fermé
Priority:
Normal
Assignee:
Jérôme Schneider
Target version:
-
Start date:
03 December 2013
Due date:
% Done:

100%

Estimated time:
Patch proposed:
Planning:

Description

Traceback reçu par email sur la production.

Le trace :

Traceback (most recent call last):

  File "/home/calebasse/venv/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 115, in get_response
    response = callback(request, *callback_args, **callback_kwargs)

  File "/home/calebasse/venv/local/lib/python2.7/site-packages/django/contrib/auth/decorators.py", line 25, in _wrapped
+_view
    return view_func(request, *args, **kwargs)

  File "/home/calebasse/venv/local/lib/python2.7/site-packages/django/views/generic/base.py", line 68, in view
    return self.dispatch(request, *args, **kwargs)

  File "/home/calebasse/venv/calebasse/calebasse/cbv.py", line 57, in dispatch
    result = super(ServiceViewMixin, self).dispatch(request, **kwargs)

  File "/home/calebasse/venv/local/lib/python2.7/site-packages/django/views/generic/base.py", line 86, in dispatch
    return handler(request, *args, **kwargs)

  File "/home/calebasse/venv/calebasse/calebasse/agenda/views.py", line 44, in post
    act = event.act

AttributeError: 'NoneType' object has no attribute 'act'

L’environnement WSGI :

<WSGIRequest
path:/camsp/agenda/2013-12-03/,
GET:<QueryDict: {}>,
POST:<QueryDict: {u'csrfmiddlewaretoken': [u'6C41dBpWh8FfG0Whay6w7vlYUJzNoZBv'], u'event-id': [u'113572'],
+u'act_state': [u'VALIDE']}>,
COOKIES:{'active-ressource-agenda': '%22%22',
 'active-worker-agenda': '31',
 'agenda-worker-tabs': '%5B%22selector-worker-31%22%5D',
 'csrftoken': '6C41dBpWh8FfG0Whay6w7vlYUJzNoZBv',
 'home-service': 'camsp',
 'sessionid': '9zkdu1b20qjsm9pvhu6rf344akuusvgh'},
META:{'CONTENT_LENGTH': '85',
 'CONTENT_TYPE': 'application/x-www-form-urlencoded',
 u'CSRF_COOKIE': u'6C41dBpWh8FfG0Whay6w7vlYUJzNoZBv',
 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
 'HTTP_ACCEPT_LANGUAGE': 'fr,fr-fr;q=0.8,en-us;q=0.5,en;q=0.3',
 'HTTP_CONNECTION': 'close',
 'HTTP_COOKIE': 'agenda-worker-tabs=%5B%22selector-worker-31%22%5D; active-worker-agenda=31; active-ressource-agenda=%2
+2%22; csrftoken=6C41dBpWh8FfG0Whay6w7vlYUJzNoZBv; home-service=camsp; sessionid=9zkdu1b20qjsm9pvhu6rf344akuusvgh',
 'HTTP_HOST': 'calebasse.aps42.org',
 'HTTP_REFERER': 'http://calebasse.aps42.org/camsp/agenda/2013-12-03/',
 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20100101 Firefox/17.0',
 'HTTP_X_FORWARDED_FOR': '192.168.0.3',
 'HTTP_X_FORWARDED_PROTO': 'HTTP/1.1',
 'HTTP_X_FORWARDED_SCHEME': 'http',
 'PATH_INFO': u'/camsp/agenda/2013-12-03/',
 'QUERY_STRING': '',
 'RAW_URI': '/camsp/agenda/2013-12-03/',
 'REMOTE_ADDR': '192.168.0.3',
 'REMOTE_PORT': '80',
 'REQUEST_METHOD': 'POST',
 'SCRIPT_NAME': u'',
 'SERVER_NAME': 'calebasse.aps42.org',
 'SERVER_PORT': '80',
 'SERVER_PROTOCOL': 'HTTP/1.0',
-   - 4148/4148: admin+aps42-prod@ent   [Aps42 prod]ERROR (EXTERNAL IP): Internal Server Error: /camsp/agenda/ -- (end)
 'REMOTE_PORT': '80',
 'REQUEST_METHOD': 'POST',
 'SCRIPT_NAME': u'',
 'SERVER_NAME': 'calebasse.aps42.org',
 'SERVER_PORT': '80',
 'SERVER_PROTOCOL': 'HTTP/1.0',
 'SERVER_SOFTWARE': 'gunicorn/18.0',
 'gunicorn.socket': <socket._socketobject object at 0x4084440>,
 'wsgi.errors': <open file '<stderr>', mode 'w' at 0x7fe653c46270>,
 'wsgi.file_wrapper': <class gunicorn.http.wsgi.FileWrapper at 0x1973530>,
 'wsgi.input': <gunicorn.http.body.Body object at 0x407c950>,
 'wsgi.multiprocess': True,
 'wsgi.multithread': False,
 'wsgi.run_once': False,
 'wsgi.url_scheme': 'http',
 'wsgi.version': (1, 0)}>

Associated revisions

Revision 5feec0ab (diff)
Added by Jérôme Schneider over 10 years ago

agenda: test if a eventwithact exists before trying to update it

Closes #4051

History

#1

Updated by Mikaël Ates over 10 years ago

  • Assignee set to Jérôme Schneider

L'exception est levée lors d'une tentative de pointage depuis l'agenda d'un rdv qui n'existe plus.
(Reproduit en ouvrant deux onglets sur le même agenda, sur le premier onglet suppression d'un rdv, sur le deuxième onglet, validation depuis l'agenda de ce même rendez-vous.)
Il faudrait indiquer un message d'erreur à l'utilisateur indiquant 'Le rendez-vous que vous essayez de pointer n'existe plus'.

#2

Updated by Jérôme Schneider over 10 years ago

  • Status changed from Nouveau to En cours
#3

Updated by Jérôme Schneider over 10 years ago

  • Status changed from En cours to Résolu (à déployer)
  • % Done changed from 0 to 100

Appliqué par commit aps42:calebasse|commit:5feec0abfd7026e4742d1e27fb686a291a5fb6d5.

#4

Updated by Jérôme Schneider over 10 years ago

Appliqué par commit calebasse|commit:5feec0abfd7026e4742d1e27fb686a291a5fb6d5.

#5

Updated by Mikaël Ates over 10 years ago

  • Status changed from Résolu (à déployer) to Fermé

Also available in: Atom PDF