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

2013-12-05 00:14:33 +08:00
 thwawar
重现步骤:
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'
```
6687 次点击
所在节点    Project Stormwind
0 条回复

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/91873

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX