Skip to content

Commit

Permalink
Merge pull request #263 from seanmorley15/development
Browse files Browse the repository at this point in the history
fix deploy bug
  • Loading branch information
seanmorley15 authored Aug 20, 2024
2 parents c038dce + f15fbbe commit 0943b99
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion backend/server/worldtravel/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def __str__(self):
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):
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/lib/components/RegionCard.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -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">
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/lib/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export type Country = {
export type Region = {
id: number;
name: string;
name_en: string;
name_en?: string;
country: number;
};

Expand Down

0 comments on commit 0943b99

Please sign in to comment.