Commit Graph

123 Commits (065a0246392c338040a2a17c4d6134d7bd6de378)

Author SHA1 Message Date
justcool393 68451513b0 get: use a single function to sanitize usernames 2022-10-27 21:39:57 -05:00
justcool393 ea46bafce2 get: List -> Iterable, we accept lists, sets, etc 2022-10-27 19:30:53 -07:00
justcool393 8a8e6f2233 get: functions to add blocks and vote properties
get: don't attempt to re-query if blocks or voted properties are already present
2022-10-27 19:30:53 -07:00
justcool393 16ba59d8b3 get: check stripped out names before querying the db and return None if graceful in other places 2022-10-27 19:30:53 -07:00
justcool393 5ff6fea4dc get: add type annotations everywhere 2022-10-27 19:30:53 -07:00
justcool393 308e9cbbd6 get: remove weird vestigal load_parent part of get_comment 2022-10-27 19:30:53 -07:00
Aevann1 1a35e2ec6a refactor banned domains 2022-10-28 00:37:29 +02:00
justcool393 fe9064a9b7
update get.py redux 2022-10-12 08:40:43 -07:00
justcool393 5c03e5a7a4
Update get.py 2022-10-12 08:33:49 -07:00
justcool393 db9b37de40 type hints for get functions :) 2022-10-12 02:22:13 -07:00
Aevann1 2aa281e8c8 refactor sorting again (untested) 2022-10-12 09:03:28 +02:00
Aevann1 925ec12141 more shadowban refactor 2022-10-12 08:53:32 +02:00
Aevann1 e1ee9a69e4 refactor seeing shadowbanned shit (untested) 2022-10-12 08:24:30 +02:00
justcool393 ae0c215af3 ... 2022-10-05 19:51:44 -07:00
justcool393 2fc3044d5b shadowban perms and stuff 2022-10-05 19:24:37 -07:00
justcool393 9575e11b8b add get_sub_by_name function 2022-10-05 03:37:29 -07:00
justcool393 fc623b7201 get id fix for sbs 2022-09-30 22:16:15 -07:00
justcool393 7e3f43c9ab
unperson shadowbanned users (#373)
* unperson shadowbanned users
if a shadowbanned user copes, does anyone hear them seethe?

* unperson shadowbanned users (by id)

* don't import that

* Add include_blocks.
We don't always want to request blocks from the db when we have a user set

* block shadowbanned users from hole mod tools

* don't allow awarding shadowbanned things

* fix conflict

* gracefully use get_account when specified and also add include_blocks flag to get_account as well
2022-09-30 14:00:58 -07:00
Aevann1 0686cdbcf6 remove testing print statement 2022-09-27 12:52:48 +02:00
Aevann1 c882b366a1 testing smth 2022-09-27 08:41:23 +02:00
Aevann1 f54791cc4c remove categories 2022-09-19 20:04:30 +02:00
Aevann1 7edc44ff6f fix https://rdrama.net/post/18459/marseycapywalking-megathread-for-bugs-and-suggestions/2713626?context=8#context 2022-09-13 11:59:40 +02:00
Aevann1 ee756bf4b6 minor submission changes 2022-09-12 09:17:57 +02:00
Aevann1 7404d94610 fix issues for new instances 2022-09-05 22:37:38 +02:00
official-techsupport d49cba78a3
improve 'graceful' behavior of get_users (#331) 2022-08-21 21:54:55 +02:00
Aevann1 0cae055403 remove weird spaces annoying me 2022-08-17 21:25:57 +02:00
Snakes 1411018f8d Add post categories.
Implemented for LGB but can likely be used for WPD and other future
sites. Similar to a reddit post flair. Provides:
  - Admin panel for Category management.
  - Category selection on post submission.
  - 'Recategorize' post action.
2022-08-07 02:57:30 -04:00
Aevann1 a8fe49f232 kitchen sink commit, all over the place 2022-07-08 21:03:04 +02:00
Aevann1 c380848d47 remove leftover code from ill-fated joinedload attempt 2022-07-08 20:28:56 +02:00
Aevann1 e34f1a1c15 Revert "testing bandwidth"
This reverts commit d6559471b7.
2022-07-08 17:13:37 +02:00
Aevann1 d6559471b7 testing bandwidth 2022-07-08 17:05:08 +02:00
Aevann1 4ba413eaa9 Revert "Revert "remove all joinedload bullshit I added""
This reverts commit 4057711c83.
2022-07-06 13:08:11 +02:00
Aevann1 4057711c83 Revert "remove all joinedload bullshit I added"
This reverts commit c8d5eb0f57.
2022-07-06 12:58:44 +02:00
Aevann1 c8d5eb0f57 remove all joinedload bullshit I added 2022-07-04 09:04:14 +02:00
Aevann1 e60c4d46fe Revert "testing bandwidth"
This reverts commit cc3137d730.
2022-07-04 04:02:34 +02:00
Aevann1 cc3137d730 testing bandwidth 2022-07-04 03:08:13 +02:00
Aevann1 a6b7fed2fc minor logic change in /@username 2022-07-03 14:12:33 +02:00
Aevann1 8917427323 fix snytax error 2022-07-03 13:59:39 +02:00
Aevann1 ed86ec1c14 more query optimization v3 2022-07-03 13:56:40 +02:00
Aevann1 3e87b20ed0 more query optiimzation v2 2022-07-03 13:30:54 +02:00
Aevann1 72884713ac more quert optimization 2022-07-03 13:21:58 +02:00
Aevann1 1f0f0ef0be messing with joins 2022-07-03 08:12:53 +02:00
Aevann1 c8b4838157 unmessing with queries 2022-07-03 06:34:29 +02:00
Aevann1 91951ed142 messing with relationships 2022-07-03 06:27:48 +02:00
Aevann1 d0d15c319a Poll rework (#312)
* poll rework

* forgot to do joinedload on comments

* Fix logic errors with voting, SQL syntax.

Kitchen sink commit from review of poll-rework changes:
  1. Fix seed-db.sql syntax error.
  2. Fix SQL patch file duplication of *submissions* tables rather
     than one set of submissions and one for comments.
  3. Start makeshift SQL patch folder, since this is a large change
     that contributors may wish to apply to their local instances.
  4. Fix checkbox (non-`exclusive`) polls being unable to be
     unchecked. For consistency with `exclusive` polls, they should.
  5. Fix changing the option of an `exclusive` poll when both
     exclusive and non-exclusive options are present in one comment/
     post causing the non-exclusive options to become unchecked.
     (which, by my reading of SQLAlchemy `Query.one_or_none()`
     really could break quite badly in some cases).

* link relationships with their counterparts

* small modification to poll unchecking

Co-authored-by: TLSM <duolsm@outlook.com>
2022-07-02 08:48:04 +02:00
Aevann1 f56be06eb8 add hole pinning 2022-07-02 01:11:48 +02:00
Aevann1 9ffc3015e2 testing 2022-07-01 20:09:56 +02:00
Aevann1 e8f5827c5e more testing 2022-07-01 15:34:11 +02:00
Aevann1 1676572f09 test 2022-07-01 15:15:44 +02:00
Aevann1 5bbd14ebd6 testing 2022-07-01 15:11:41 +02:00