Commit graph

7980 commits

Author SHA1 Message Date
Hugh Rundle
803bba71a6 fix error handling
- when using raise_for_status we need to catch an HTTPError, not a ConnectionError
- simplify instance actor - use internal email address since it will never be used anyway, and make default username less likely to already be in use.
2023-01-22 15:59:19 +11:00
Hugh Rundle
317fa5cdfd black 2023-01-20 20:05:14 +11:00
Hugh Rundle
e8452011f7 handle get_data exceptions better
Makes exception handling more precise, only raising status for 401s.

Also fixes a string pylint was complaining about.
2023-01-20 19:55:38 +11:00
Hugh Rundle
f8c9df4aff pylint fixes 2023-01-20 18:20:18 +11:00
Hugh Rundle
4108238716 resolve SECURE_FETCH bugs
ERROR HANDLING FIXES

- use raise_for_status() to pass through response code
- handle exceptions where no response object is passed through

INSTANCE ACTOR

- models.User.objects.create_user function cannot take an ID
- allow instance admins to determine username and email for instance actor in settings.py
2023-01-20 16:32:17 +11:00
Hugh Rundle
0da5473b0c black formatting 2023-01-20 16:31:27 +11:00
Hugh Rundle
0c614e828f deal with missing digests in signatures
If no digest value is passed to make_signature and Exception was thrown.
Since digest is added to the signature headers if it is not None anyway, there is no need to assign the digest value before that check.
When signing a request _as the server_ for Mastodon's AUTHORIZED_FETCH there is no need to include a digest.
2023-01-20 08:24:46 +11:00
Hugh Rundle
9a0f8f9c2a fix test_get_representative_not_existing params 2023-01-19 16:40:13 +11:00
Hugh Rundle
d66e2fe861 merge in latest changes 2023-01-18 14:12:01 +11:00
Mouse Reeve
10322cdff3
Merge pull request #2572 from chdorner/fix/create-edit-book-cover-url
Ensure transient `cover_url` field value gets persisted across form renders
2023-01-14 18:08:22 -08:00
Mouse Reeve
788a33ee8a
Merge pull request #2600 from chdorner/fix/card-header
Fix generated note content checks in card header template
2023-01-12 15:41:52 -08:00
Christof Dorner
0291ffbcb1 Fix generated note content checks in card header template 2023-01-12 20:58:41 +01:00
Mouse Reeve
0f0da0bdbb
Merge pull request #2598 from bookwyrm-social/revert-2555-author_website
Revert "Add Website field to author"
2023-01-11 19:30:41 -08:00
Mouse Reeve
dd2b166382
Revert "Add Website field to author" 2023-01-11 19:21:40 -08:00
Mouse Reeve
60f3f8fcc0
Merge pull request #2596 from bookwyrm-social/commented-nginx
Re-comment nginx config
2023-01-11 17:07:00 -08:00
Mouse Reeve
8fa8d433aa Re-comment nginx config
I thought this didn't need to be commented out but it does (if it isn't,
it tried to load the cert, which doesn't yet exist)
2023-01-11 16:56:31 -08:00
Mouse Reeve
b89060d5fc
Merge pull request #2594 from bookwyrm-social/locales
Updates locales
2023-01-11 15:02:15 -08:00
Mouse Reeve
71f5e5a688 Updates locales 2023-01-11 14:47:42 -08:00
Mouse Reeve
ba5d0f1b14
Merge pull request #2593 from asmaloney/opengraph
Move all opengraph (/twitter) metadata into one template
2023-01-11 14:44:15 -08:00
Andy Maloney
b4aa39f0ed Move all opengraph (/twitter) metadata into one template
This makes it easier to modify & allows us to set title & description for specific types of pages.

Sets us up for #2575
2023-01-11 16:17:41 -05:00
Mouse Reeve
5c8145b79d
Merge pull request #2586 from asmaloney/fix-duplicate-suggestions
{list} Fix duplicate suggestions in Add Books section
2023-01-11 08:40:32 -08:00
Mouse Reeve
bae3986a85
Merge pull request #2588 from asmaloney/spelling-author
Fix spelling in author form
2023-01-11 07:27:34 -08:00
Mouse Reeve
c279477507
Merge pull request #2590 from asmaloney/spelling-blocktrans-arg
Fix spelling in blocktrans arg
2023-01-11 07:27:27 -08:00
Mouse Reeve
5ab67cac87
Merge pull request #2591 from asmaloney/spelling-various
Fix spelling in various comments
2023-01-11 07:27:18 -08:00
Mouse Reeve
bc276c4b3a
Merge pull request #2589 from asmaloney/spelling-aria
Fix two "aria-hidden" tags
2023-01-11 07:20:21 -08:00
Andy Maloney
e5539a6faf Fix spelling in various comments 2023-01-10 17:24:02 -05:00
Andy Maloney
c6d2edfe7a Fix spelling in blocktrans arg 2023-01-10 17:21:00 -05:00
Andy Maloney
e1c90314ad Fix two "aria-hidden" tags 2023-01-10 17:17:03 -05:00
Andy Maloney
a027204e5b Fix spelling in author form
"oepnlibrary" ➡️ "openlibrary"
2023-01-10 16:51:13 -05:00
Andy Maloney
dd23bc4d0f {list} Fix duplicate suggestions in Add Books section
Fixes #2584

(Also fix a spelling mistake in a comment in book_search.py)
2023-01-10 11:08:11 -05:00
Mouse Reeve
917569ef0e
Merge pull request #2373 from codeurimpulsif/contrib-system
Add contrib directory with systemd service files for front, worker and scheduler
2023-01-09 20:26:02 -08:00
Mouse Reeve
cdf51ccbc4
Merge pull request #2580 from Giebisch/fix-rating-half-stars
Fix Half Stars for Rating books
2023-01-09 20:24:50 -08:00
Mouse Reeve
bdd32c5628
Merge pull request #2555 from jaschaurbach/author_website
Add Website field to author
2023-01-09 20:14:14 -08:00
Mouse Reeve
c9fa90f83b
Merge pull request #2547 from avandeursen/docker-test-run
Ensure django tests pass in default Docker setting
2023-01-09 20:06:39 -08:00
Mouse Reeve
9480318c5d
Merge pull request #2544 from joachimesque/redirect-after-shelving-book
Redirect back to the original page after shelving book
2023-01-09 20:05:13 -08:00
Giebisch
892ba563a4 Fix Half Stars for Rating books 2023-01-07 20:59:32 +01:00
Joachim
336c92d96e
Merge branch 'main' into redirect-after-shelving-book 2023-01-06 15:13:57 +01:00
Christof Dorner
1c6548a0ad Ensure transient cover_url field value gets persisted across form renders
Given this field doesn't map to an `Edition` model field it lost its values when re-rendering the form.
It worked only when the form was valid and rendered as part of the confirmation screen, which is due to
the context data value being set in `add_authors` which was only getting called after the form validation.

I've opted to pull it out into a separate new function that gets called before form validation.
2023-01-04 18:02:04 +01:00
Mouse Reeve
2bd94b1332
Merge pull request #2563 from joachimesque/update-github-actions
Update github actions versions
2023-01-02 07:58:25 -07:00
Joachim
4b55b4c026 Update black 2023-01-01 21:09:25 +01:00
Joachim
3f6cdff363 Update github actions versions 2023-01-01 21:06:35 +01:00
Joachim
fa3edea87b Update validate.py 2023-01-01 20:51:23 +01:00
Joachim
ac2ef667af Fix error when no referer 2023-01-01 19:57:10 +01:00
Joachim
bc19d7c658 Black 2023-01-01 19:45:12 +01:00
Joachim
f266c71da9 Replace hidden field with HTTP Referrer value 2023-01-01 19:42:03 +01:00
Arie van Deursen
2bf8cd88f1
Fix @pytest.mark.skipif formatting 2022-12-30 18:44:28 +01:00
Joachim
78c214a6d4 Add validation before using url 2022-12-30 17:56:25 +01:00
Joachim
bfe04feca9 Add validation util + test 2022-12-30 17:55:47 +01:00
Doctor
45aa397863 Add redis.service in After for bookwyrm and bookwyrm-scheduler services 2022-12-30 17:36:16 +01:00
Codimp
358a0e60a9 Add systemd service files for bookwyrm front, worker and scheduler 2022-12-30 17:36:16 +01:00