Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Valider le formulaire d'import d'une galerie sans zip crée une 500 #3244

Closed
gustavi opened this issue Dec 16, 2015 · 2 comments

Comments

@gustavi
Copy link
Member

commented Dec 16, 2015

Via Sentry.

Du coup c'est très simple à corriger.

Les logs :



Stacktrace (most recent call last):

  File "django/core/handlers/base.py", line 111, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "django/views/generic/base.py", line 69, in view
    return self.dispatch(request, *args, **kwargs)
  File "django/utils/decorators.py", line 29, in _wrapper
    return bound_func(*args, **kwargs)
  File "django/contrib/auth/decorators.py", line 21, in _wrapped_view
    return view_func(request, *args, **kwargs)
  File "django/utils/decorators.py", line 25, in bound_func
    return func.__get__(self, type(self))(*args2, **kwargs2)
  File "django/utils/decorators.py", line 29, in _wrapper
    return bound_func(*args, **kwargs)
  File "zds/member/decorator.py", line 27, in _can_write_and_read_now
    return func(request, *args, **kwargs)
  File "django/utils/decorators.py", line 25, in bound_func
    return func.__get__(self, type(self))(*args2, **kwargs2)
  File "zds/gallery/views.py", line 426, in dispatch
    return super(ImportImages, self).dispatch(*args, **kwargs)
  File "django/views/generic/base.py", line 87, in dispatch
    return handler(request, *args, **kwargs)
  File "django/views/generic/edit.py", line 172, in post
    if form.is_valid():
  File "django/forms/forms.py", line 162, in is_valid
    return self.is_bound and not bool(self.errors)
  File "django/forms/forms.py", line 154, in errors
    self.full_clean()
  File "django/forms/forms.py", line 354, in full_clean
    self._clean_form()
  File "django/forms/forms.py", line 378, in _clean_form
    cleaned_data = self.clean()
  File "zds/gallery/forms.py", line 206, in clean
    extension = zip_file.name.split('.')[-1]

L'erreur :

zds.gallery.forms in clean
AttributeError: 'NoneType' object has no attribute 'name'

NOTE : comportement à vérifier sur les autres contenus.

@gustavi gustavi changed the title Erreur 500 lors d'un export de galerie Erreur 500 lors d'un import de galerie Dec 16, 2015

@artragis

This comment has been minimized.

Copy link
Member

commented Dec 16, 2015

je pense que quelqu'un a appuyé sur "ok" sans mettre de zip.

@gustavi

This comment has been minimized.

Copy link
Member Author

commented Dec 16, 2015

Je confirme ...

@gustavi gustavi changed the title Erreur 500 lors d'un import de galerie Valider le formulaire d'import d'une galerie sans zip crée une 500 Dec 16, 2015

@gustavi gustavi added the Facile label Dec 16, 2015

@pierre-24 pierre-24 added this to the Version de développement milestone Dec 18, 2015

@pierre-24 pierre-24 closed this Dec 18, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.