V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX Workspace
https://workspace.v2ex.com/
thwawar
V2EX  ›  Project Stormwind

在 New Feeds 中点击带@的用户名报 None 错误

  •  
  •   thwawar · 2013-12-05 00:14:33 +08:00 · 6859 次点击
    这是一个创建于 3992 天前的主题,其中的信息可能已经有所发展或是发生改变。
    重现步骤:
    1. 在New Feeds中Post一条Message
    2. 点击上条Message中的Reply连接再发一条Message
    3. 最后点击恢复中 @ 的用户名报如下错误:
    http://paste.ofcode.org/AciKxF6zSSUk8i2faP4nuX

    ``` python
    Traceback (most recent call last):
    File "/usr/local/lib/python2.7/dist-packages/tornado/web.py", line 1141, in _when_complete
    callback()
    File "/usr/local/lib/python2.7/dist-packages/tornado/web.py", line 1162, in _execute_method
    self._when_complete(method(*self.path_args, **self.path_kwargs),
    File "/www/workspace/workspace/security.py", line 44, in wrapper
    return method(self, *args, **kwargs)
    File "/www/workspace/workspace/handlers/desktop/project/team/__init__.py", line 184, in get
    self.finalize('project/team/member', 'html')
    File "/www/workspace/workspace/handlers/desktop/__init__.py", line 49, in finalize
    self.write(template.render(self.values))
    File "/usr/local/lib/python2.7/dist-packages/jinja2/environment.py", line 969, in render
    return self.environment.handle_exception(exc_info, True)
    File "/usr/local/lib/python2.7/dist-packages/jinja2/environment.py", line 742, in handle_exception
    reraise(exc_type, exc_value, tb)
    File "/www/workspace/workspace/templates/desktop/project/team/member.html", line 1, in top-level template code
    {% extends 'desktop/common/layout1.html' %}
    File "/www/workspace/workspace/templates/desktop/common/layout1.html", line 1, in top-level template code
    {% extends 'desktop/common/layout0.html' %}
    File "/www/workspace/workspace/templates/desktop/common/layout0.html", line 31, in top-level template code
    {% block single %}{% endblock %}
    File "/www/workspace/workspace/templates/desktop/common/layout1.html", line 31, in block "single"
    <div id="Content">{% block content %}
    File "/www/workspace/workspace/templates/desktop/project/team/member.html", line 6, in block "content"
    <div class="header"><div class="fr">{% if profile.owner.id == member.id %}<a href="/profile/update"><img src="/static/img/edit.png" border="0" /></a>{% endif %}</div><a href="/project/{{ project.name }}/team" class="black">{% trans %}Team{% endtrans %}</a> <img src="/static/img/gt.png" align="absmiddle" /> {{ profile.owner.username }}</div>
    File "/usr/local/lib/python2.7/dist-packages/jinja2/environment.py", line 397, in getattr
    return getattr(obj, attribute)
    UndefinedError: 'None' has no attribute 'owner'
    ```
    目前尚无回复
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   2748 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 40ms · UTC 01:58 · PVG 09:58 · LAX 17:58 · JFK 20:58
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.