forked from rDrama/rDrama
delete property that jc forgot to actually define...
parent
92cbe64ac0
commit
284b3ba9ec
|
@ -711,7 +711,7 @@ class User(Base):
|
||||||
@property
|
@property
|
||||||
@lazy
|
@lazy
|
||||||
def alt_ids(self):
|
def alt_ids(self):
|
||||||
return [x.id for x in self.get_alt_graph(g.db) if not x._alt_deleted]
|
return [x.id for x in self.get_alt_graph(g.db)]
|
||||||
|
|
||||||
@property
|
@property
|
||||||
@lazy
|
@lazy
|
||||||
|
|
|
@ -102,7 +102,6 @@ def check_for_alts(current:User, include_current_session=True):
|
||||||
session["history"] = list(past_accs)
|
session["history"] = list(past_accs)
|
||||||
g.db.flush()
|
g.db.flush()
|
||||||
for u in get_alt_graph(current.id):
|
for u in get_alt_graph(current.id):
|
||||||
if u._alt_deleted: continue
|
|
||||||
if u.shadowbanned and current.id not in DONT_SHADOWBAN:
|
if u.shadowbanned and current.id not in DONT_SHADOWBAN:
|
||||||
current.shadowbanned = u.shadowbanned
|
current.shadowbanned = u.shadowbanned
|
||||||
current.ban_reason = u.ban_reason
|
current.ban_reason = u.ban_reason
|
||||||
|
|
|
@ -89,7 +89,7 @@ def vote_post_comment(target_id, new, v, cls, vote_cls):
|
||||||
if v.id == target.author.id:
|
if v.id == target.author.id:
|
||||||
coin_delta = 0
|
coin_delta = 0
|
||||||
|
|
||||||
v_alts_id = [x.id for x in v.get_alt_graph(self.id) if not x._alt_deleted]
|
v_alts_id = [x.id for x in v.get_alt_graph(self.id)]
|
||||||
|
|
||||||
alt = False
|
alt = False
|
||||||
if target.author.id in v.alt_ids or v.id in target.author.alt_ids:
|
if target.author.id in v.alt_ids or v.id in target.author.alt_ids:
|
||||||
|
|
|
@ -39,10 +39,9 @@
|
||||||
<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>
|
||||||
<td>{{user._alt_deleted}}</td>
|
|
||||||
<td>
|
<td>
|
||||||
<button type="button" id="delink-alt-{{u.id}}-{{user.id}}" class="btn btn-danger {% if user._alt_deleted %}d-none{% endif %}" onclick="postToastSwitch(this,'/@{{u.username}}/alts/{{user.id}}/deleted', this.id, 'relink-alt-{{u.id}}-{{user.id}}', 'd-none', null, 'PUT')">Delink</button>
|
<button type="button" id="delink-alt-{{u.id}}-{{user.id}}" class="btn btn-danger" onclick="postToastSwitch(this,'/@{{u.username}}/alts/{{user.id}}/deleted', this.id, 'relink-alt-{{u.id}}-{{user.id}}', 'd-none', null, 'PUT')">Delink</button>
|
||||||
<button type="button" id="relink-alt-{{u.id}}-{{user.id}}" class="btn btn-danger {% if not user._alt_deleted %}d-none{% endif %}" onclick="postToastSwitch(this,'/@{{u.username}}/alts/{{user.id}}/deleted', this.id, 'delink-alt-{{u.id}}-{{user.id}}', 'd-none', null, 'DELETE')">Relink</button>
|
<button type="button" id="relink-alt-{{u.id}}-{{user.id}}" class="btn btn-danger" onclick="postToastSwitch(this,'/@{{u.username}}/alts/{{user.id}}/deleted', this.id, 'delink-alt-{{u.id}}-{{user.id}}', 'd-none', null, 'DELETE')">Relink</button>
|
||||||
<a class="btn btn-secondary" href="/@{{user.username}}/alts">Alts</a>
|
<a class="btn btn-secondary" href="/@{{user.username}}/alts">Alts</a>
|
||||||
{% if v.admin_level >= PERMS['VIEW_ALT_VOTES'] %}
|
{% if v.admin_level >= PERMS['VIEW_ALT_VOTES'] %}
|
||||||
<a class="btn btn-secondary" href="/admin/alt_votes/?u1={{u.username}}&u2={{user.username}}">Alt Votes</a>
|
<a class="btn btn-secondary" href="/admin/alt_votes/?u1={{u.username}}&u2={{user.username}}">Alt Votes</a>
|
||||||
|
|
|
@ -225,7 +225,7 @@
|
||||||
<span id="profile--alts">Alts:</span>
|
<span id="profile--alts">Alts:</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<ul id="profile--alts-list">
|
<ul id="profile--alts-list">
|
||||||
{% for account in get_alt_graph(u.id) if not account._alt_deleted and (v.can_see_shadowbanned or not account.shadowbanned) %}
|
{% for account in get_alt_graph(u.id) if v.can_see_shadowbanned or not account.shadowbanned %}
|
||||||
<li><a href="{{account.url}}">@{{account.username}}</a>{% if account._is_manual %} [m]{% endif %}</li>
|
<li><a href="{{account.url}}">@{{account.username}}</a>{% if account._is_manual %} [m]{% endif %}</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -489,7 +489,7 @@
|
||||||
<span id="profile-mobile--alts">Alts:</span>
|
<span id="profile-mobile--alts">Alts:</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<ul id="profile-mobile--alts-list">
|
<ul id="profile-mobile--alts-list">
|
||||||
{% for account in get_alt_graph(u.id) if not account._alt_deleted and (v.can_see_shadowbanned or not account.shadowbanned) %}
|
{% for account in get_alt_graph(u.id) if v.can_see_shadowbanned or not account.shadowbanned %}
|
||||||
<li><a href="{{account.url}}">@{{account.username}}</a>{% if account._is_manual %} [m]{% endif %}</li>
|
<li><a href="{{account.url}}">@{{account.username}}</a>{% if account._is_manual %} [m]{% endif %}</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
Loading…
Reference in New Issue