Skip to content
This repository has been archived by the owner on Dec 7, 2023. It is now read-only.

Commit

Permalink
Fixed unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Sandro Rodrigues committed Jun 14, 2017
1 parent ed681a5 commit d0e08a2
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions ajax_partials/mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,11 @@ def get_partial_title(self):

def render_to_response(self, context, **response_kwargs):
""" Returns the rendered template in JSON format """
context.update({
'title': self.get_partial_title()
})
partial_title = self.get_partial_title()
if partial_title:
context.update({
'title': self.get_partial_title()
})
if self.request.is_ajax():
data = {
"content": render_to_string(
Expand Down

0 comments on commit d0e08a2

Please sign in to comment.