Skip to content

Commit

Permalink
Fix django-suit NoneType is not iterable
Browse files Browse the repository at this point in the history
  • Loading branch information
ecreality committed Jul 17, 2019
1 parent fbf322f commit 64fd5b2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions reversion_compare/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ def compare_view(self, request, object_id, extra_context=None):
opts = self.model._meta

context = {
**self.admin_site.each_context(request),
"opts": opts,
"app_label": opts.app_label,
"model_name": capfirst(opts.verbose_name),
Expand Down Expand Up @@ -193,8 +194,7 @@ def compare_view(self, request, object_id, extra_context=None):
prev_url = "?version_id1=%i&version_id2=%i" % (prev_version.id, version1.id)
context.update({"prev_url": prev_url})

extra_context = extra_context or {}
context.update(extra_context)
context.update(extra_context or {})
return render(request, self.compare_template or self._get_template_list("compare.html"), context)


Expand Down

0 comments on commit 64fd5b2

Please sign in to comment.