1
0
Fork 0
mirror of https://github.com/seanmorley15/AdventureLog.git synced 2025-07-25 07:49:37 +02:00

Merge pull request #263 from seanmorley15/development

fix deploy bug
This commit is contained in:
Sean Morley 2024-08-20 17:57:16 -04:00 committed by GitHub
commit 0943b99dfe
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 5 additions and 5 deletions

View file

@ -45,7 +45,7 @@ class Country(models.Model):
class Region(models.Model):
id = models.CharField(primary_key=True)
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)
def __str__(self):

View file

@ -57,10 +57,10 @@
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">
{#if region.name == region.name_en}
<h2 class="card-title overflow-ellipsis">{region.name}</h2>
{:else}
{#if region.name !== region?.name_en}
<h2 class="card-title overflow-ellipsis">{region.name} ({region.name_en})</h2>
{:else}
<h2 class="card-title overflow-ellipsis">{region.name}</h2>
{/if}
<p>{region.id}</p>
<div class="card-actions justify-end">

View file

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