fix deploy bug
This commit is contained in:
@@ -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):
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|||||||
@@ -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;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user