Commit graph

8422 commits

Author SHA1 Message Date
Mouse Reeve
b3a519c082 Converts report "comments" into broader "actions" table
This table will now track all actions taken on a report, like resolving
it, re-opening it, suspending the reported user, et cetera, in addition
to comments. When there are multiple admins, this change will make it
easier to understand what actions have been taken by whom on a report.
2023-05-16 11:00:33 -07:00
Mouse Reeve
ab146f652a Adds action types to report comments table 2023-05-16 09:02:43 -07:00
Mouse Reeve
ee1dd612fb
Merge pull request #2853 from bookwyrm-social/locales
Updates locales
2023-05-15 13:46:18 -07:00
Mouse Reeve
aae8b1ac14 Updates locales 2023-05-15 11:52:36 -07:00
Mouse Reeve
24d59315df
Merge pull request #2843 from bookwyrm-social/user-reports-link
Show all (not just open) reports when linked from user admin
2023-05-15 06:04:42 -07:00
Mouse Reeve
d6a321dda9
Merge pull request #2839 from WesleyAC/optimize-get-audience-user-id-only
Optimize get_audience by only fetching IDs
2023-05-15 06:03:40 -07:00
Mouse Reeve
120a0f1882
Merge pull request #2852 from bpeel/remove-from-translate-shelf-name
Use the translated shelf name in the “remove from” shelf button
2023-05-15 05:43:13 -07:00
Mouse Reeve
3a5ddf33a9
Merge pull request #2850 from bpeel/other-edition-translate-shelf
Use the translated shelf name in the message for when another edition is shelved
2023-05-15 05:39:13 -07:00
Mouse Reeve
0e0d9d2d08 Updates ignore html error list 2023-05-15 05:31:07 -07:00
Neil Roberts
666f09c576 Use the translated shelf name in the “remove from” shelf button
The button to remove a book from a shelf when looking at the book’s page
wasn’t using the translated shelf name. It was also concatenating
strings instead of using a placeholder, which is difficult to translate
in some languages. This fixes it to use the translate_shelf_name
function and use the same placeholder string as in other places.
2023-05-15 11:26:12 +02:00
Neil Roberts
a4ea4082e6 Use the translated shelf name in message when another edition is shelved
In the page for an edition, if the user has a different edition of the
same work on a shelf then a message is shown. Previously the name of the
status shelves wasn’t being translated.
2023-05-12 15:33:51 +02:00
Jascha Ezra Urbach
70a5153271
Merge pull request #2838 from bpeel/merge-works-command
Add a management command to merge works
2023-05-11 16:29:58 +02:00
Jascha Ezra Urbach
45127c9648
Merge pull request #2847 from bookwyrm-social/dependabot/pip/django-3.2.19
build(deps): bump django from 3.2.18 to 3.2.19
2023-05-11 16:27:19 +02:00
dependabot[bot]
1139d214a0
build(deps): bump django from 3.2.18 to 3.2.19
Bumps [django](https://github.com/django/django) from 3.2.18 to 3.2.19.
- [Commits](https://github.com/django/django/compare/3.2.18...3.2.19)

---
updated-dependencies:
- dependency-name: django
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-09 22:15:37 +00:00
Mouse Reeve
912e92bacd Show all (not just open) reports when linked from user admin 2023-05-07 09:50:24 -07:00
Wesley Aptekar-Cassels
097cd3ed72 Optimize get_audience by only fetching IDs
Looking at the tracing data from this function in prod, only ~500ms is
spent in the database. My best guess for the rest of the time is
transferring and creating the user objects, which we don't use, since we
simply need the ID.
2023-04-28 12:51:44 -04:00
Neil Roberts
d80cefd416 Add a management command to merge works 2023-04-26 15:54:37 +02:00
Mouse Reeve
7211906697
Merge pull request #2837 from bookwyrm-social/revert-2798-celery-increase-ping-timeout
Revert "Increase Celery ping timeout for monitoring page"
2023-04-26 06:13:03 -07:00
Mouse Reeve
7bd9623b68
Revert "Increase Celery ping timeout for monitoring page" 2023-04-25 18:24:23 -07:00
Mouse Reeve
b77ae9e783 Ticks version number 2023-04-25 17:42:32 -07:00
Mouse Reeve
b92836ee7b
Merge pull request #2836 from bookwyrm-social/locales
Updates locales
2023-04-25 17:41:51 -07:00
Mouse Reeve
4e025b5105 Updates locales 2023-04-25 17:21:54 -07:00
Mouse Reeve
8fa89f5ece
Merge pull request #2821 from bpeel/merge-commands
Add management commands to merge a pair of editions or authors
2023-04-25 16:27:12 -07:00
Mouse Reeve
ac48457748
Merge pull request #2770 from bookwyrm-social/import-rating-parser
Catch value errors when parsing imported ratings
2023-04-25 16:21:25 -07:00
Mouse Reeve
cbb027c56c
Merge pull request #2778 from ranok/upstream_pr
Move the search request logic into the AbstractConnector
2023-04-25 16:20:24 -07:00
Mouse Reeve
718939834a Fixes check on isbn list length in LT importer 2023-04-18 10:04:20 -07:00
Jacob Torrey
84834eb5d3 Run bw-dev black to fix formatting
Signed-off-by: Jacob Torrey <jacob@jacobtorrey.com>
2023-04-17 15:06:41 +00:00
Mouse Reeve
ed5471c7ab
Merge pull request #2832 from bookwyrm-social/fix-api/instance
Fix language constant to show correct lang in API
2023-04-16 19:10:38 -07:00
Jascha Urbach
0cae89b2b6
Update wellknown.py
./bw-dev black
2023-04-16 17:30:27 +02:00
Jascha Urbach
f3b1b1d8e4
Fix language constant to show correct lang in API
api/v1/instance had "en" hardcoded as language. This fix takes LANGUAGE_CODE from settings.py/.env and takes the first two letters as response.
2023-04-16 17:28:05 +02:00
Mouse Reeve
290b740392
Merge pull request #2805 from WesleyAC/stop-ignoring-task-results
Stop ignoring task results
2023-04-15 09:03:43 -07:00
Jascha Ezra Urbach
c918617a6a
Merge branch 'main' into import-rating-parser 2023-04-15 17:21:27 +02:00
Jascha Ezra Urbach
fadbc76aaa
Merge pull request #2789 from bpeel/translatable-shelf-name
Fix two places where the reading status shelf name wasn’t translated
2023-04-15 16:59:59 +02:00
Jascha Ezra Urbach
d788105eeb
Merge pull request #2814 from WesleyAC/bw-dev-pick-docker-compose-command
Choose installed docker compose command in bw-dev
2023-04-15 16:52:38 +02:00
Jascha Ezra Urbach
dfcc61a3e1
Merge pull request #2816 from bpeel/missing-translatable-strings
Fix a few strings that weren’t marked as translatable
2023-04-15 16:51:51 +02:00
Jascha Urbach
e28562949b
./bw.-dev black
get rid of the black error.
2023-04-15 16:31:15 +02:00
Neil Roberts
bd893e29de Add management commands to merge editions and authors 2023-04-15 11:59:40 +02:00
Neil Roberts
71e2486d01 Move the merging code from deduplicate code to common module
That way it can be used in a new command to merge individual items.
2023-04-15 11:59:40 +02:00
Neil Roberts
2bbc9a16ad Fix deduplicating books that are on a shelf or in a list
Previously when the deduplicate_book_data script tried to merge an
edition that was on a shelf or in a list then it would fail because when
the canonical book was added to the shelf or the list then it wouldn’t
set the extra fields of the linking table for the “through” model of the
field. These would end up defaulting to NULL, but that is not valid for
some of the fields in ShelfItem and ListItem so postgres wouldn’t accept
it.

To fix that, this patch makes it skip updating fields that have a
non-autogenerated linking table. The linking table would appear as a
separate model anyway so the book will be moved via that instead.

Fixes: #2817
2023-04-15 11:59:12 +02:00
Neil Roberts
3619d8960b Mark two strings as translatable in the getting started questionnaire 2023-04-14 16:49:00 +02:00
Neil Roberts
f520d1b7f8 Make the text on the search button translatable 2023-04-14 16:40:50 +02:00
Wesley Aptekar-Cassels
43b34610a6 Choose installed docker compose command in bw-dev
Docker is removing support for docker-compose, and it doesn't appear to
be possible to install it anymore. Instead, it has been replaced with
compose V2 which is a docker plugin called with 'docker compose' (no
hyphen). See https://docs.docker.com/compose/compose-v2/

Thanks to @Neriderc for noticing this in #2781.
2023-04-11 21:51:31 -04:00
Wesley Aptekar-Cassels
8e25ae34d6
Merge pull request #2782 from ranok/list_fix
Small quality of life improvements to list handling
2023-04-11 12:31:58 -04:00
Wesley Aptekar-Cassels
843147e16b
Merge pull request #2808 from bpeel/series-no-author
Don't show the series as a link if the book has no author
2023-04-11 12:25:52 -04:00
Neil Roberts
41633090ba Don't show the series as a link if the book has no author
The series link needs an author so if it doesn't have one, instead of
showing a server error let's just show the series details as plain text
without a link.

Fixes: #2797
2023-04-08 17:13:34 +02:00
Wesley Aptekar-Cassels
e9f26b7d50
Merge pull request #2800 from WesleyAC/fix-activitypub-request-accept-header
Fix Accept header for requesting ActivityPub objects
2023-04-08 11:02:27 -04:00
Wesley Aptekar-Cassels
1048638e30 Stop ignoring task results
This is essentially a revert of 9cbff312a. The commit was at the advice
of the Celery docs for optimization, but I've since decided that the
downsides in terms of making things harder to debug (it makes Flower
nearly useless, for instance) are bigger than the upsides in performance
gain (which seem extremely small in practice, given how long our tasks
take, and the number of tasks we have).
2023-04-07 21:51:44 -04:00
Mouse Reeve
7272ca2564
Merge pull request #2785 from WesleyAC/optimize-get-audience
Optimize get_audience
2023-04-07 13:27:00 -07:00
Wesley Aptekar-Cassels
07b50a1453 Optimize get_audience
This avoids filtering for the user that made the post in the same query
as we use for other things, which should allow for better use of indices
in all cases. Previously, #2723 did some work on this that only worked
for some cases in HomeStream, but this code should work for all cases.

Related: #2720
2023-04-07 10:38:14 -04:00
Wesley Aptekar-Cassels
77264493eb Override get_audience instead of _get_audience in LocalStream
I suspect this will make some future work simpler.
2023-04-07 10:37:02 -04:00