mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-25 19:11:09 +00:00
cleanup
This commit is contained in:
parent
c95f160216
commit
01a56540d0
3 changed files with 4 additions and 14 deletions
|
@ -256,4 +256,5 @@ class Move(Verb):
|
|||
allow_external_connections=allow_external_connections,
|
||||
)
|
||||
else:
|
||||
return None
|
||||
# we might do something with this to move other objects at some point
|
||||
pass
|
||||
|
|
|
@ -6,9 +6,6 @@ from bookwyrm import activitypub
|
|||
from .activitypub_mixin import ActivityMixin
|
||||
from .base_model import BookWyrmModel
|
||||
from . import fields
|
||||
from .status import Status
|
||||
from bookwyrm.models import User
|
||||
|
||||
|
||||
class Move(ActivityMixin, BookWyrmModel):
|
||||
"""migrating an activitypub user account"""
|
||||
|
@ -34,14 +31,6 @@ class Move(ActivityMixin, BookWyrmModel):
|
|||
|
||||
activity_serializer = activitypub.Move
|
||||
|
||||
# pylint: disable=unused-argument
|
||||
@classmethod
|
||||
def ignore_activity(cls, activity, allow_external_connections=True):
|
||||
"""don't bother with incoming moves of unknown objects"""
|
||||
# TODO
|
||||
pass
|
||||
|
||||
|
||||
class MoveUser(Move):
|
||||
"""migrating an activitypub user account"""
|
||||
|
||||
|
|
|
@ -41,9 +41,9 @@ class MoveUser(View):
|
|||
|
||||
return redirect("user-feed", username=request.user.username)
|
||||
|
||||
except (PermissionDenied):
|
||||
except PermissionDenied:
|
||||
form.errors["target"] = [
|
||||
"You must set this server's user as an alias on the user you wish to move to before moving"
|
||||
"Set this user as an alias on the user you wish to move to before moving"
|
||||
]
|
||||
data = {"form": form, "user": request.user}
|
||||
return TemplateResponse(request, "preferences/move_user.html", data)
|
||||
|
|
Loading…
Reference in a new issue