Skip to content

Commit

Permalink
[admin] Avoid setting extra_content to mutable object
Browse files Browse the repository at this point in the history
  • Loading branch information
nemesifier committed May 3, 2017
1 parent 26f3eb6 commit 298b2a2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions openwisp_controller/config/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ def get_extra_context(self, pk=None):
ctx.update({'default_template_urls': self._get_default_template_urls()})
return ctx

def add_view(self, request, form_url='', extra_context={}):
extra_context.update(self.get_extra_context())
def add_view(self, request, form_url='', extra_context=None):
extra_context = self.get_extra_context()
return super(BaseConfigAdmin, self).add_view(request, form_url, extra_context)


Expand Down

0 comments on commit 298b2a2

Please sign in to comment.