diff --git a/vrobbler/apps/scrobbles/api/serializers.py b/vrobbler/apps/scrobbles/api/serializers.py index 109bd89..8a1d4b3 100644 --- a/vrobbler/apps/scrobbles/api/serializers.py +++ b/vrobbler/apps/scrobbles/api/serializers.py @@ -63,7 +63,9 @@ class KoReaderImportSerializer(serializers.HyperlinkedModelSerializer): fields = "__all__" -class AudioScrobblerTSVImportSerializer(serializers.HyperlinkedModelSerializer): +class AudioScrobblerTSVImportSerializer( + serializers.HyperlinkedModelSerializer +): class Meta: model = AudioScrobblerTSVImport fields = "__all__" diff --git a/vrobbler/apps/webpages/models.py b/vrobbler/apps/webpages/models.py index 89b37e5..b2cbcef 100644 --- a/vrobbler/apps/webpages/models.py +++ b/vrobbler/apps/webpages/models.py @@ -39,9 +39,9 @@ class Domain(TimeStampedModel): def scrobbles_for_user(self, user_id): from scrobbles.models import Scrobble - return Scrobble.objects.filter(web_page__domain=self, user_id=user_id).order_by( - "-timestamp" - ) + return Scrobble.objects.filter( + web_page__domain=self, user_id=user_id + ).order_by("-timestamp") class WebPage(ScrobblableMixin): @@ -136,7 +136,9 @@ class WebPage(ScrobblableMixin): def scrobbles(self, user): Scrobble = apps.get_model("scrobbles", "Scrobble") - return Scrobble.objects.filter(user=user, web_page=self).order_by("-timestamp") + return Scrobble.objects.filter(user=user, web_page=self).order_by( + "-timestamp" + ) def clean_title(self, title: str, save=True): if len(title.split("|")) > 1: @@ -211,7 +213,9 @@ class WebPage(ScrobblableMixin): return if response.status_code == 200: - logger.info("Website already exists in archive", extra={"url": self.url}) + logger.info( + "Website already exists in archive", extra={"url": self.url} + ) else: raise Exception( f"Failed to push URL to archivebox (Response {response.status_code})"