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/views.py

    rfd6ed57 rd7dcfee  
    483483            group.group_status = groups.models.GroupStatus.objects.get(slug='active')
    484484            group.constitution_url = ""
    485             group.recognition_date = datetime.date.today()
     485            group.recognition_date = datetime.datetime.now()
    486486            group.set_updater(request.user)
    487487
Note: See TracChangeset for help on using the changeset viewer.