forked from GithubBackups/healthchecks
Prepare for the removal of Check.user_id
This commit is contained in:
parent
fba8806e97
commit
e2d2665edf
@ -156,10 +156,10 @@ class Profile(models.Model):
|
||||
if nag and num_down == 0:
|
||||
return False
|
||||
|
||||
# Sort checks by owner. Need this because will group by owner in
|
||||
# Sort checks by project. Need this because will group by project in
|
||||
# template.
|
||||
checks = checks.select_related("user", "user__profile")
|
||||
checks = checks.order_by("user_id")
|
||||
checks = checks.select_related("project")
|
||||
checks = checks.order_by("project_id")
|
||||
# list() executes the query, to avoid DB access while
|
||||
# rendering the template
|
||||
checks = list(checks)
|
||||
|
@ -1,10 +1,10 @@
|
||||
{% load humanize hc_extras %}
|
||||
{% regroup checks by user as groups %}
|
||||
{% regroup checks by project as groups %}
|
||||
<table style="margin: 0; width: 100%; font-size: 16px;" cellpadding="0" cellspacing="0">
|
||||
{% for group in groups %}
|
||||
<tr>
|
||||
<td colspan="2" style="font-weight: bold; padding: 32px 8px 8px 8px; color: #333;">
|
||||
{{ group.grouper.profile|mangle_link }}
|
||||
{{ group.grouper|mangle_link }}
|
||||
</td>
|
||||
<td style="padding: 32px 8px 8px 8px; margin: 0; font-size: 12px; color: #9BA2AB; font-family: Helvetica, Arial, sans-serif;">Last Ping</td>
|
||||
</tr>
|
||||
|
Loading…
x
Reference in New Issue
Block a user