Skip to content

Commit

Permalink
fix: 381 - fix add regions migration file (#407)
Browse files Browse the repository at this point in the history
  • Loading branch information
tim738745 authored Oct 25, 2024
1 parent d98e374 commit 21814e5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion django/api/migrations/0038_addregions.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ def add_region_data(apps, schema_editor):

for region in regions_data:
Regions.objects.get_or_create(
name=region["name"],
defaults={
"create_timestamp": current_timestamp,
"create_user": "SYSTEM",
"update_timestamp": current_timestamp,
"update_user": "SYSTEM",
"name": region["name"]
}
)

Expand Down
2 changes: 1 addition & 1 deletion django/api/models/regions.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

class Regions(Auditable):

name = models.CharField(blank=False, null=False, max_length=250)
name = models.CharField(blank=False, null=False, max_length=250, unique=True)

class Meta:
db_table = "regions"

0 comments on commit 21814e5

Please sign in to comment.