forked from rDrama/rDrama
fix shadowbanned and nonexistent users in marseys table
parent
767cc467bb
commit
5a1224ddc7
|
@ -27,7 +27,7 @@ def rdrama(id, title):
|
||||||
@auth_required
|
@auth_required
|
||||||
def marseys(v:User):
|
def marseys(v:User):
|
||||||
marseys = get_marseys(g.db)
|
marseys = get_marseys(g.db)
|
||||||
authors = get_accounts_dict([m.author_id for m in marseys], graceful=True, include_shadowbanned=False)
|
authors = get_accounts_dict([m.author_id for m in marseys], v=v, graceful=True, include_shadowbanned=False)
|
||||||
original = os.listdir("/asset_submissions/marseys/original")
|
original = os.listdir("/asset_submissions/marseys/original")
|
||||||
for marsey in marseys:
|
for marsey in marseys:
|
||||||
marsey.user = authors.get(marsey.author_id)
|
marsey.user = authors.get(marsey.author_id)
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
{% for user in alts %}
|
{% for user in alts %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{loop.index}}</td>
|
<td>{{loop.index}}</td>
|
||||||
<td>{% include "admin/shadowbanned_tooltip.html" %}{% include "user_in_table.html" %}</td>
|
<td>{% include "user_in_table.html" %}</td>
|
||||||
<td>{{user.created_utc|timestamp}}</td>
|
<td>{{user.created_utc|timestamp}}</td>
|
||||||
<td>{{user._alt_created_utc|timestamp}}</td>
|
<td>{{user._alt_created_utc|timestamp}}</td>
|
||||||
<td>{{user._is_manual}}</td>
|
<td>{{user._is_manual}}</td>
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
<td>{{marsey.count}}</td>
|
<td>{{marsey.count}}</td>
|
||||||
{% if FEATURES['ASSET_SUBMISSIONS'] %}
|
{% if FEATURES['ASSET_SUBMISSIONS'] %}
|
||||||
{% set user = marsey.user %}
|
{% set user = marsey.user %}
|
||||||
<td data-sort-key="{{user.username}}">{% include "user_in_table.html" %}</td>
|
<td data-sort-key="{{user.username.lower() if user else ''}}">{% include "user_in_table.html" %}</td>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<td data-sort-key="{{marsey.created_utc or 0}}" {% if marsey.created_utc != None %}data-time="{{marsey.created_utc}}"{% endif %}></td>
|
<td data-sort-key="{{marsey.created_utc or 0}}" {% if marsey.created_utc != None %}data-time="{{marsey.created_utc}}"{% endif %}></td>
|
||||||
{% if FEATURES['ASSET_SUBMISSIONS'] %}
|
{% if FEATURES['ASSET_SUBMISSIONS'] %}
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
{%- include 'admin/shadowbanned_tooltip.html' -%}
|
||||||
|
{% if user and (not user.shadowbanned or v.can_see_shadowbanned) %}
|
||||||
<a style="color:#{{user.name_color}};font-weight:bold" href="/@{{user.username}}">
|
<a style="color:#{{user.name_color}};font-weight:bold" href="/@{{user.username}}">
|
||||||
<div class="profile-pic-20-wrapper mb-2">
|
<div class="profile-pic-20-wrapper mb-2">
|
||||||
<img loading="lazy" src="{{user.profile_url}}" class="pp20">
|
<img loading="lazy" src="{{user.profile_url}}" class="pp20">
|
||||||
|
@ -7,3 +9,4 @@
|
||||||
</div>
|
</div>
|
||||||
<span {% if user.patron %}class="patron" style="background-color:#{{user.name_color}}"{% endif %}>{{user.user_name}}</span>
|
<span {% if user.patron %}class="patron" style="background-color:#{{user.name_color}}"{% endif %}>{{user.user_name}}</span>
|
||||||
</a>
|
</a>
|
||||||
|
{% endif %}
|
||||||
|
|
Loading…
Reference in New Issue