Ignore:
Timestamp:
Dec 25, 2011, 3:48:39 AM (14 years ago)
Author:
Alex Dehnert <adehnert@…>
Branches:
master, space-access, stable, stage
Children:
d9137a7
Parents:
c8cb9ba
git-author:
Alex Dehnert <adehnert@…> (12/25/11 03:48:39)
git-committer:
Alex Dehnert <adehnert@…> (12/25/11 03:48:39)
Message:

Make recognition_date a datetime field

There are two motivations for this:

  • Having the time a group filled out the startup form is kinda useful, and the group object stores when the startup form is filled out in the recognition_date field, until the group is recognized. If that field is a datetime field, then that data becomes available.
  • Apparently reversion has a bug whereby it will store whatever is assigned to the field, and then validate it on the way out. If you assign a datetime to a normal date field, then this will cause a validation error when you load it from the database. Since we were storing a datetime when doing group startup, this was occasionally causing breakage. (See Trac #47.)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • asadb/groups/models.py

    rfd6ed57 rd7dcfee  
    3535    funding_account_id = models.IntegerField(null=True, blank=True, )
    3636    athena_locker = models.CharField(max_length=20, blank=True)
    37     recognition_date = models.DateField()
     37    recognition_date = models.DateTimeField()
    3838    update_date = models.DateTimeField(editable=False, )
    3939    updater = models.CharField(max_length=30, editable=False, null=True, ) # match Django username field
Note: See TracChangeset for help on using the changeset viewer.