Esempio n. 1
0
 def clean_player(self):
     player = self.cleaned_data.get('player')
     action = site.get_by_id(self.cleaned_data['event_id'])
     if action.with_player and player is None:
         raise ValidationError(
             _('This field is required with the specified event'))
     return player
Esempio n. 2
0
 def get_event(self):
     return site.get_by_id(self.event_id)