diff options
author | Daniel Schadt <kingdread@gmx.de> | 2023-08-17 22:22:27 +0200 |
---|---|---|
committer | Daniel Schadt <kingdread@gmx.de> | 2023-08-17 22:22:27 +0200 |
commit | a59672b41d6d3f3008019ce774dcd3b46ecdd419 (patch) | |
tree | edfd4157acbd9c785d026888ab865f757e89f320 | |
parent | 79a440d36b6735cf2afbf220f8cc3ffd58e3bc8a (diff) | |
download | fietsboek-a59672b41d6d3f3008019ce774dcd3b46ecdd419.tar.gz fietsboek-a59672b41d6d3f3008019ce774dcd3b46ecdd419.tar.bz2 fietsboek-a59672b41d6d3f3008019ce774dcd3b46ecdd419.zip |
fix lint
-rw-r--r-- | fietsboek/models/track.py | 2 | ||||
-rw-r--r-- | fietsboek/models/user.py | 2 | ||||
-rw-r--r-- | 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. |