Changeset e0689aa


Ignore:
Timestamp:
Jan 27, 2010, 11:49:31 AM (15 years ago)
Author:
Alex Dehnert <adehnert@…>
Branches:
master, client
Children:
5abe506
Parents:
31bd056
git-author:
Alex Dehnert <adehnert@…> (01/27/10 11:49:31)
git-committer:
Alex Dehnert <adehnert@…> (01/27/10 11:49:31)
Message:

Lazily initialize CommitteesField?

Otherwise, any page view will throw an exception
if the Accounts -> Assets -> Budget account
doesn't exist, which is a bit annoying

File:
1 edited

Legend:

Unmodified
Added
Removed
  • treasury/vouchers/views.py

    r70ce03a re0689aa  
    4040
    4141class SelectRequestBasicsForm(Form):
    42     area = CommitteesField()
     42    area = None
    4343    term = ModelChoiceField(queryset = BudgetTerm.objects.all())
     44    def __init__(self, *args, **kargs):
     45        self.area = CommitteesField()
    4446
    4547@user_passes_test(lambda u: u.is_authenticated())
Note: See TracChangeset for help on using the changeset viewer.