Skip to content

Commit 35a1ae3

Browse files
authored
Merge pull request #128 from codersforcauses/issue-112-Make_host_URL_optional_for_games
Issue 112 make host url optional for games
2 parents 9c24a38 + 01e2961 commit 35a1ae3

3 files changed

Lines changed: 34 additions & 14 deletions

File tree

client/src/pages/games/[id].tsx

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -156,19 +156,21 @@ export default function IndividualGamePage() {
156156
</td>
157157
<td className="py-1 text-right sm:py-2">{devStage}</td>
158158
</tr>
159-
<tr className="border-b-2 border-gray-300">
160-
<td className="py-1 pr-2 text-muted-foreground sm:py-2">
161-
Host Site
162-
</td>
163-
<td className="py-1 text-right sm:py-2">
164-
<a
165-
href={game.hostURL}
166-
className="text-primary underline hover:underline"
167-
>
168-
{game.hostURL}
169-
</a>
170-
</td>
171-
</tr>
159+
{game.hostURL && (
160+
<tr className="border-b-2 border-gray-300">
161+
<td className="py-1 pr-2 text-muted-foreground sm:py-2">
162+
Host Site
163+
</td>
164+
<td className="py-1 text-right sm:py-2">
165+
<a
166+
href={game.hostURL}
167+
className="text-primary underline hover:underline"
168+
>
169+
{game.hostURL}
170+
</a>
171+
</td>
172+
</tr>
173+
)}
172174
<tr>
173175
<td className="py-1 pr-2 text-muted-foreground sm:py-2">
174176
Event
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Generated by Django 5.1.15 on 2026-02-28 14:51
2+
3+
from django.db import migrations, models
4+
5+
6+
class Migration(migrations.Migration):
7+
8+
dependencies = [
9+
('game_dev', '0027_remove_game_itchgameembedid_game_itchgameplayableid'),
10+
]
11+
12+
operations = [
13+
migrations.AlterField(
14+
model_name='game',
15+
name='hostURL',
16+
field=models.URLField(blank=True, max_length=2083),
17+
),
18+
]

server/game_dev/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class CompletionStatus(models.IntegerChoices):
5353
null=False,
5454
)
5555
active = models.BooleanField(default=True, null=False)
56-
hostURL = models.URLField(max_length=2083)
56+
hostURL = models.URLField(max_length=2083, blank=True)
5757
itchEmbedID = models.PositiveIntegerField(
5858
default=None,
5959
null=True,

0 commit comments

Comments
 (0)