From a59672b41d6d3f3008019ce774dcd3b46ecdd419 Mon Sep 17 00:00:00 2001 From: Daniel Schadt Date: Thu, 17 Aug 2023 22:22:27 +0200 Subject: fix lint --- fietsboek/models/track.py | 2 +- fietsboek/models/user.py | 2 +- fietsboek/views/user_data.py | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/fietsboek/models/track.py b/fietsboek/models/track.py index 81ba302..0f5fd39 100644 --- a/fietsboek/models/track.py +++ b/fietsboek/models/track.py @@ -234,7 +234,7 @@ class Track(Base): "ImageMetadata", back_populates="track", cascade="all, delete-orphan" ) favourees: Mapped[list["models.User"]] = relationship( - "User", secondary=track_favourite_assoc, back_populates="favourite_tracks", + "User", secondary=track_favourite_assoc, back_populates="favourite_tracks" ) @classmethod diff --git a/fietsboek/models/user.py b/fietsboek/models/user.py index 896d572..432c61d 100644 --- a/fietsboek/models/user.py +++ b/fietsboek/models/user.py @@ -122,7 +122,7 @@ class User(Base): "Track", secondary="track_people_assoc", back_populates="tagged_people" ) favourite_tracks: Mapped[list["Track"]] = relationship( - "Track", secondary="track_favourite_assoc", back_populates="favourees", + "Track", secondary="track_favourite_assoc", back_populates="favourees" ) uploads: Mapped[list["Upload"]] = relationship( "Upload", back_populates="owner", cascade="all, delete-orphan" diff --git a/fietsboek/views/user_data.py b/fietsboek/views/user_data.py index 492d845..a7680e4 100644 --- a/fietsboek/views/user_data.py +++ b/fietsboek/views/user_data.py @@ -160,7 +160,9 @@ def json_friends(request): return friends -@view_config(route_name="toggle-favourite", renderer="json", permission="user", request_method="POST") +@view_config( + route_name="toggle-favourite", renderer="json", permission="user", request_method="POST" +) def do_toggle_favourite(request: Request) -> dict: """Toggles the favourite status for the given track. -- cgit v1.2.3