remove holes (#492)

* remove holes

* don't import class that doesn't exist

* remove subs in template code

* remove subs_created

* fix sticky bug

* uh... i think this will fix it????

* fix stupid nearly ungrokkable nesting error

* ...

* ....

* ....

* *sigh*

* .............................i think i got it.

* Revert ".............................i think i got it."

This reverts commit 419a545875.

* Revert "*sigh*"

This reverts commit fcfc9d7995.

* Revert "...."

This reverts commit e200c8f6f0.

* Revert "...."

This reverts commit 681db8cb02.

* Revert "..."

This reverts commit c54372b9ff.

* Revert "fix stupid nearly ungrokkable nesting error"

This reverts commit e202fd774c.

* Revert "uh... i think this will fix it????"

This reverts commit e4d9366093.

* readd missing endif

* fix email templates.

* fix frontpage listing

* some minor fixes wrt saving

* fix some listing errors

* Remove more references to holes system

A couple of these came from the merge of #554. A few others were just
left in the templates and presumably hard to catch on the first
removal pass.

* remove unnecessary lazy

* Add migration

Tested. Very sensitive to order. I wound up borrowing the statement
order we used for deleting sub rows on upstream (manually, of course).

---------

Co-authored-by: TLSM <duolsm@outlook.com>
This commit is contained in:
justcool393 2023-03-31 22:13:30 -07:00 committed by GitHub
parent 1647b4cf20
commit 77af24a5b1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
42 changed files with 226 additions and 1260 deletions

View file

@ -401,9 +401,9 @@ class Comment(CreatedBase):
if not v: return -2
if v.id == self.author_id: return 1
return getattr(self, 'voted', 0)
@lazy
def sticky_api_url(self, v) -> Optional[str]:
def sticky_api_url(self, v) -> str | None:
'''
Returns the API URL used to sticky this comment.
:returns: Currently `None` always. Stickying comments was disabled
@ -414,12 +414,11 @@ class Comment(CreatedBase):
if not v: return None
if v.admin_level >= 2:
return 'sticky_comment'
if v.id == self.post.author_id:
elif v.id == self.post.author_id:
return 'pin_comment'
if self.post.sub and v.mods(self.post.sub):
return 'mod_pin'
return None
@lazy
def active_flags(self, v):
return len(self.flags(v))