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

Erreur quand sur des vieilles commandes #123

Open
almet opened this issue Sep 28, 2022 · 0 comments
Open

Erreur quand sur des vieilles commandes #123

almet opened this issue Sep 28, 2022 · 0 comments

Comments

@almet
Copy link
Owner

almet commented Sep 28, 2022

Quand je tente d'accéder à des vieilles commandes, pour lesquelles les groupes ont été supprimés, alors il y a une erreur.

Je pense qu'il faudrait changer la manière dont les choses fonctionnent : actuellement les groupes sont globaux, alors qu'il faudrait surement que ceux-cis soient compris dans une distribution.

Voici l'erreur :

./venv/bin/copanier serve --reload
Starting monitor for PID 13116.
Rolling on http://127.0.0.1:2244
Traceback (most recent call last):
  File "/home/alexis/dev/copanier/venv/lib/python3.10/site-packages/roll/__init__.py", line 78, in __call__
    await handler(request, response, **request.route.vars)
  File "/home/alexis/dev/copanier/copanier/views/delivery.py", line 215, in show_delivery
    response.html("delivery/show_delivery.html", {"delivery": delivery})
  File "/home/alexis/dev/copanier/copanier/views/core.py", line 34, in html
    self.body = self.render_template(template_name, *args, **kwargs)
  File "/home/alexis/dev/copanier/copanier/views/core.py", line 30, in render_template
    return env.get_template(template_name).render(*args, **context)
  File "/home/alexis/dev/copanier/venv/lib/python3.10/site-packages/jinja2/environment.py", line 1090, in render
    self.environment.handle_exception()
  File "/home/alexis/dev/copanier/venv/lib/python3.10/site-packages/jinja2/environment.py", line 832, in handle_exception
    reraise(*rewrite_traceback_stack(source=source))
  File "/home/alexis/dev/copanier/venv/lib/python3.10/site-packages/jinja2/_compat.py", line 28, in reraise
    raise value.with_traceback(tb)
  File "/home/alexis/dev/copanier/copanier/templates/delivery/show_delivery.html", line -1, in top-level template code
  File "/home/alexis/dev/copanier/copanier/templates/base.html", line 4, in top-level template code
    <!DOCTYPE html>
  File "/home/alexis/dev/copanier/copanier/templates/delivery/show_delivery.html", line 9, in block "body"
    {% if request['user'].email == delivery.contact and delivery.status > delivery.EMPTY %}
  File "/home/alexis/dev/copanier/copanier/templates/includes/delivery_table.html", line -31, in top-level template code
  File "/home/alexis/dev/copanier/venv/lib/python3.10/site-packages/jinja2/environment.py", line 471, in getattr
    return getattr(obj, attribute)
jinja2.exceptions.UndefinedError: 'dict object' has no attribute 'la-jacquerie'
Traceback (most recent call last):
  File "/home/alexis/dev/copanier/venv/lib/python3.10/site-packages/roll/__init__.py", line 78, in __call__
    await handler(request, response, **request.route.vars)
  File "/home/alexis/dev/copanier/copanier/views/delivery.py", line 215, in show_delivery
    response.html("delivery/show_delivery.html", {"delivery": delivery})
  File "/home/alexis/dev/copanier/copanier/views/core.py", line 34, in html
    self.body = self.render_template(template_name, *args, **kwargs)
  File "/home/alexis/dev/copanier/copanier/views/core.py", line 30, in render_template
    return env.get_template(template_name).render(*args, **context)
  File "/home/alexis/dev/copanier/venv/lib/python3.10/site-packages/jinja2/environment.py", line 1090, in render
    self.environment.handle_exception()
  File "/home/alexis/dev/copanier/venv/lib/python3.10/site-packages/jinja2/environment.py", line 832, in handle_exception
    reraise(*rewrite_traceback_stack(source=source))
  File "/home/alexis/dev/copanier/venv/lib/python3.10/site-packages/jinja2/_compat.py", line 28, in reraise
    raise value.with_traceback(tb)
  File "/home/alexis/dev/copanier/copanier/templates/delivery/show_delivery.html", line -1, in top-level template code
  File "/home/alexis/dev/copanier/copanier/templates/base.html", line 4, in top-level template code
    <!DOCTYPE html>
  File "/home/alexis/dev/copanier/copanier/templates/delivery/show_delivery.html", line 6, in block "body"
    <li class="pure-menu-item"><a href="{{ url_for('list_products', id=delivery.id) }}/produits.pdf" class="pure-menu-link"><i class="icon-ribbon"></i>&nbsp;Bons de commande</a></li>
  File "/home/alexis/dev/copanier/copanier/templates/includes/delivery_table.html", line -30, in top-level template code
  File "/home/alexis/dev/copanier/venv/lib/python3.10/site-packages/jinja2/environment.py", line 471, in getattr
    return getattr(obj, attribute)
jinja2.exceptions.UndefinedError: 'dict object' has no attribute 'chez-francine'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant