1
0
Fork 0
mirror of https://github.com/seanmorley15/AdventureLog.git synced 2025-07-23 14:59:36 +02:00

fix deploy bug

This commit is contained in:
Sean Morley 2024-08-20 17:53:37 -04:00
parent 53272a58f8
commit e3479ae491
3 changed files with 3 additions and 3 deletions

View file

@ -45,7 +45,7 @@ class Country(models.Model):
class Region(models.Model): class Region(models.Model):
id = models.CharField(primary_key=True) id = models.CharField(primary_key=True)
name = models.CharField(max_length=100) name = models.CharField(max_length=100)
name_en = models.CharField(max_length=100) name_en = models.CharField(max_length=100, blank=True, null=True)
country = models.ForeignKey(Country, on_delete=models.CASCADE) country = models.ForeignKey(Country, on_delete=models.CASCADE)
def __str__(self): def __str__(self):

View file

@ -57,7 +57,7 @@
class="card w-full max-w-xs sm:max-w-sm md:max-w-md lg:max-w-md xl:max-w-md bg-primary-content shadow-xl overflow-hidden text-base-content" class="card w-full max-w-xs sm:max-w-sm md:max-w-md lg:max-w-md xl:max-w-md bg-primary-content shadow-xl overflow-hidden text-base-content"
> >
<div class="card-body"> <div class="card-body">
{#if region.name == region.name_en} {#if region.name == region?.name_en}
<h2 class="card-title overflow-ellipsis">{region.name}</h2> <h2 class="card-title overflow-ellipsis">{region.name}</h2>
{:else} {:else}
<h2 class="card-title overflow-ellipsis">{region.name} ({region.name_en})</h2> <h2 class="card-title overflow-ellipsis">{region.name} ({region.name_en})</h2>

View file

@ -44,7 +44,7 @@ export type Country = {
export type Region = { export type Region = {
id: number; id: number;
name: string; name: string;
name_en: string; name_en?: string;
country: number; country: number;
}; };