Skip to content

Commit 50f00ca

Browse files
Fix linting and style
1 parent 6ab696f commit 50f00ca

3 files changed

Lines changed: 14 additions & 5 deletions

File tree

client/src/hooks/useGameshowcase.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,12 @@ function transformApiShowcaseGameToUi(data: ApiShowcaseGame): UiShowcaseGame {
3636
return {
3737
...data,
3838
gameCover: data.game_cover_thumbnail ?? "/game_dev_club_logo.svg",
39+
artworks: data.artworks.map((a) => ({
40+
id: a.art_id,
41+
name: a.name,
42+
image: a.media,
43+
sourceGameId: a.source_game_id,
44+
})),
3945
};
4046
}
4147

server/game_dev/admin.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
11
from django.contrib import admin
2-
from .models import Member, Game, Event, GameContributor, GameShowcase, Committee, SocialMedia
2+
from .models import Member, Game, Event, GameContributor, GameShowcase, Committee, SocialMedia, Art, ArtContributor, ArtShowcase
33

44

55
class SocialMediaInline(admin.TabularInline):
66
model = SocialMedia
77
extra = 1
88

9-
# from issue-8-merge-40 temp need changes
10-
from .models import Art, ArtContributor, ArtShowcase
11-
129

1310
class MemberAdmin(admin.ModelAdmin):
1411
list_display = ("id", "name", "active", "profile_picture", "about", "pronouns")

server/game_dev/migrations/0031_art_artcontributor_artshowcase.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,13 @@ class Migration(migrations.Migration):
4444
('art', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='showcase', to='game_dev.art')),
4545
],
4646
options={
47-
'constraints': [models.UniqueConstraint(fields=('art',), name='unique_artshowcase_per_art', violation_error_message='Each art piece can only have one showcase.')],
47+
'constraints': [
48+
models.UniqueConstraint(
49+
fields=('art',),
50+
name='unique_artshowcase_per_art',
51+
violation_error_message='Each art piece can only have one showcase.'
52+
)
53+
],
4854
},
4955
),
5056
]

0 commit comments

Comments
 (0)