Handle activities for deleted objects.
This commit is contained in:
@@ -53,7 +53,10 @@ def index():
|
|||||||
for act in activities['_items']:
|
for act in activities['_items']:
|
||||||
act.actor_user = pillar.web.subquery.get_user_info(act.actor_user)
|
act.actor_user = pillar.web.subquery.get_user_info(act.actor_user)
|
||||||
act.project = id_to_proj[act.project]
|
act.project = id_to_proj[act.project]
|
||||||
|
try:
|
||||||
act.link = current_attract.link_for_activity(act)
|
act.link = current_attract.link_for_activity(act)
|
||||||
|
except pillarsdk.ResourceNotFound:
|
||||||
|
act.link = None
|
||||||
|
|
||||||
return render_template('attract/index.html',
|
return render_template('attract/index.html',
|
||||||
tasks=tasks,
|
tasks=tasks,
|
||||||
|
@@ -43,11 +43,13 @@
|
|||||||
|
|
||||||
ul
|
ul
|
||||||
| {% for act in activities['_items'] %}
|
| {% for act in activities['_items'] %}
|
||||||
|
| {% if act.link %}
|
||||||
li
|
li
|
||||||
a(href="{{ act.link }}")
|
a(href="{{ act.link }}")
|
||||||
img.actor-avatar(src="{{ act['actor_user']['email'] | gravatar }}")
|
img.actor-avatar(src="{{ act['actor_user']['email'] | gravatar }}")
|
||||||
span.date(title="{{ act._created }}") {{ act._created | pretty_date_time }}
|
span.date(title="{{ act._created }}") {{ act._created | pretty_date_time }}
|
||||||
span.actor {{ act['actor_user']['full_name'] }}
|
span.actor {{ act['actor_user']['full_name'] }}
|
||||||
span.verb {{ act.verb }}
|
span.verb {{ act.verb }}
|
||||||
|
| {% endif %}
|
||||||
| {% endfor %}
|
| {% endfor %}
|
||||||
| {% endblock %}
|
| {% endblock %}
|
||||||
|
Reference in New Issue
Block a user