Skip to content

Commit

Permalink
events: Remove Event.get_context()
Browse files Browse the repository at this point in the history
The added context variables seem to be ununused. Remove the method.
  • Loading branch information
donald committed Mar 26, 2021
1 parent 73c51f8 commit c3cbe28
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions mpicms/events/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,17 +90,6 @@ def clean(self):
if self.end and self.end < self.start:
raise ValidationError({'end_time': 'The end time cannot be before the start time.'})

def get_context(self, request, *args, **kwargs):
context = super().get_context(request, *args, **kwargs)

events = []
for child in self.get_parent().get_children().type(Event).live().specific():
events.append(child.get_dict(request))

context["events"] = json.dumps(events)

return context

class Meta(object): # noqa
ordering = ['start_date']
verbose_name = _('event')
Expand Down

0 comments on commit c3cbe28

Please sign in to comment.