diff --git a/bookwyrm/models/fields.py b/bookwyrm/models/fields.py index 3b369e84..e1c947f4 100644 --- a/bookwyrm/models/fields.py +++ b/bookwyrm/models/fields.py @@ -356,7 +356,7 @@ def image_serializer(value, alt): else: return None if not url[:4] == "http": - url = "https://{:s}{:s}".format(DOMAIN, url) + url = "https://{:s}/{:s}".format(DOMAIN, url) return activitypub.Document(url=url, name=alt) diff --git a/bookwyrm/tests/models/test_fields.py b/bookwyrm/tests/models/test_fields.py index caf12b84..0d93d99c 100644 --- a/bookwyrm/tests/models/test_fields.py +++ b/bookwyrm/tests/models/test_fields.py @@ -17,7 +17,7 @@ from django.db import models from django.test import TestCase from django.utils import timezone -from bookwyrm import activitypub, settings +from bookwyrm import activitypub from bookwyrm.activitypub.base_activity import ActivityObject from bookwyrm.models import fields, User, Status from bookwyrm.models.base_model import BookWyrmModel