app/soc/views/models/group.py
changeset 681 48983ecf4665
parent 668 77f9a6ea6e67
child 755 1ed041c0cdc6
equal deleted inserted replaced
680:7f047b2a2d3a 681:48983ecf4665
    69     """See base.View._editGet().
    69     """See base.View._editGet().
    70     """
    70     """
    71 
    71 
    72     # fill in the founded_by with data from the entity
    72     # fill in the founded_by with data from the entity
    73     form.fields['founded_by'].initial = entity.founder.name
    73     form.fields['founded_by'].initial = entity.founder.name
       
    74     super(View, self)._editGet(request, entity, form)
    74 
    75 
    75   def _editPost(self, request, entity, fields):
    76   def _editPost(self, request, entity, fields):
    76     """See base.View._editPost().
    77     """See base.View._editPost().
    77     """
    78     """
    78 
    79 
    79     if not entity:
    80     if not entity:
    80       # only if we are creating a new entity we should fill in founder
    81       # only if we are creating a new entity we should fill in founder
    81       account = users.get_current_user()
    82       account = users.get_current_user()
    82       user = user_logic.logic.getForFields({'account': account}, unique=True)
    83       user = user_logic.logic.getForFields({'account': account}, unique=True)
    83       fields['founder'] = user
    84       fields['founder'] = user
       
    85 
       
    86     super(View, self)._editPost(request, entity, fields)