Skip to content

Commit

Permalink
removed get_default_user_timezone and replaced with placeholder value…
Browse files Browse the repository at this point in the history
… that'd get deleted anyways for new migrations.

Signed-off-by: Jason <jasoncameron.all@gmail.com>
  • Loading branch information
JasonLovesDoggo committed Feb 5, 2024
1 parent 1d6c47e commit cee177c
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 10 deletions.
2 changes: 1 addition & 1 deletion core/migrations/0032_alter_user_timezone.py
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ class Migration(migrations.Migration):
("US/Pacific", "US/Pacific"),
("UTC", "UTC"),
],
default=core.models.user.get_default_user_timezone,
default="UTC",
max_length=50,
),
),
Expand Down
2 changes: 1 addition & 1 deletion core/migrations/0047_auto_20211009_2110.py
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ class Migration(migrations.Migration):
("US/Pacific", "US/Pacific"),
("UTC", "UTC"),
],
default=core.models.user.get_default_user_timezone,
default="UTC",
max_length=50,
),
),
Expand Down
2 changes: 1 addition & 1 deletion core/migrations/0048_alter_user_timezone.py
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ class Migration(migrations.Migration):
("US/Pacific", "US/Pacific"),
("UTC", "UTC"),
],
default=core.models.user.get_default_user_timezone,
default="UTC",
max_length=50,
),
),
Expand Down
2 changes: 1 addition & 1 deletion core/migrations/0049_alter_user_timezone.py
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ class Migration(migrations.Migration):
("US/Pacific", "US/Pacific"),
("UTC", "UTC"),
],
default=core.models.user.get_default_user_timezone,
default="UTC",
max_length=50,
),
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ class Migration(migrations.Migration):
("US/Pacific", "US/Pacific"),
("UTC", "UTC"),
],
default=core.models.user.get_default_user_timezone,
default="UTC",
max_length=50,
),
),
Expand Down
5 changes: 0 additions & 5 deletions core/models/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,6 @@ def get_by_natural_key(self, username):
return self.get(**{self.model.USERNAME_FIELD + "__iexact": username})


def get_default_user_timezone():
"""Only used in migrations now."""
return settings.TIME_ZONE


class User(AbstractUser):
objects = CaseInsensitiveUserManager()
bio = models.TextField(blank=True)
Expand Down

0 comments on commit cee177c

Please sign in to comment.