fix tests and templates

This commit is contained in:
Hugh Rundle 2023-09-25 15:49:25 +10:00
parent 01a56540d0
commit d67903fd4b
No known key found for this signature in database
GPG key ID: A7E35779918253F9
4 changed files with 8 additions and 3 deletions

View file

@ -7,6 +7,7 @@ from .activitypub_mixin import ActivityMixin
from .base_model import BookWyrmModel
from . import fields
class Move(ActivityMixin, BookWyrmModel):
"""migrating an activitypub user account"""
@ -31,6 +32,7 @@ class Move(ActivityMixin, BookWyrmModel):
activity_serializer = activitypub.Move
class MoveUser(Move):
"""migrating an activitypub user account"""

View file

@ -43,6 +43,7 @@
{% endspaceless %}
{% endif %}
</div>
<div>
{% if user.moved_to %}
<div class="container my-6">
<div class="notification is-info has-text-centered">

View file

@ -88,9 +88,11 @@ class User(TestCase):
"https://www.w3.org/ns/activitystreams",
"https://w3id.org/security/v1",
{
"manuallyApprovesFollowers": "as:manuallyApprovesFollowers",
"schema": "http://schema.org#",
"PropertyValue": "schema:PropertyValue",
"alsoKnownAs": {"@id": "as:alsoKnownAs", "@type": "@id"},
"manuallyApprovesFollowers": "as:manuallyApprovesFollowers",
"movedTo": {"@id": "as:movedTo", "@type": "@id"},
"schema": "http://schema.org#",
"value": "schema:value",
},
],

View file

@ -43,7 +43,7 @@ class MoveUser(View):
except PermissionDenied:
form.errors["target"] = [
"Set this user as an alias on the user you wish to move to before moving"
"Set this user as an alias on the user you are moving to first"
]
data = {"form": form, "user": request.user}
return TemplateResponse(request, "preferences/move_user.html", data)