Fix formatting

This commit is contained in:
Lukáš Kucharczyk 2024-07-09 23:04:14 +02:00
parent 34d42e2af5
commit 6328d835ee
Signed by: lukas
SSH Key Fingerprint: SHA256:vMuSwvwAvcT6htVAioMP7rzzwMQNi3roESyhv+nAxeg
2 changed files with 6 additions and 4 deletions

View File

@ -112,9 +112,11 @@ class Purchase(models.Model):
def __str__(self): def __str__(self):
additional_info = [ additional_info = [
self.get_type_display() if self.type != Purchase.GAME else "", self.get_type_display() if self.type != Purchase.GAME else "",
f"{self.edition.platform} version on {self.platform}" (
if self.platform != self.edition.platform f"{self.edition.platform} version on {self.platform}"
else self.platform, if self.platform != self.edition.platform
else self.platform
),
self.edition.year_released, self.edition.year_released,
self.get_ownership_type_display(), self.get_ownership_type_display(),
] ]

View File

@ -35,7 +35,7 @@ urlpatterns = [
views.add_purchase, views.add_purchase,
name="add_purchase_for_edition", name="add_purchase_for_edition",
), ),
path("session/add", views.add_session, name="add_session"), path("session/add", views.add_session, name="add_session"),
path( path(
"session/add/for-purchase/<int:purchase_id>", "session/add/for-purchase/<int:purchase_id>",
views.add_session, views.add_session,