Skip to content

Commit

Permalink
update date_expire initial value setup
Browse files Browse the repository at this point in the history
  • Loading branch information
mikkonie committed Apr 24, 2024
1 parent 510d8bb commit a138356
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions adminalerts/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,8 @@ def __init__(self, current_user=None, *args, **kwargs):

# Creation
if not self.instance.pk:
# TODO: Why don't we use self.initial here?
self.fields['date_expire'].initial = (
timezone.now() + timezone.timedelta(days=1)
self.initial['date_expire'] = timezone.now() + timezone.timedelta(
days=1
)
self.fields['send_email'].help_text = EMAIL_HELP_CREATE
# Updating
Expand Down

0 comments on commit a138356

Please sign in to comment.