Skip to content

Commit

Permalink
use older format string for backward compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Hall committed Jan 15, 2021
1 parent 9bfe9c4 commit 04fc0b3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions notifications/templatetags/notifications_tags.py
Expand Up @@ -71,9 +71,9 @@ def register_notify_callbacks(badge_class='live_notify_badge', # pylint: disabl
)

# add a nonce value to the script tag if one is provided
nonce_str = f' nonce="{nonce}"' if nonce is not None else ""
nonce_str = ' nonce="{nonce}"'.format(nonce=nonce) if nonce is not None else ""

script = f'<script type="text/javascript"{nonce_str}>' + definitions
script = '<script type="text/javascript"{nonce}>'.format(nonce=nonce_str) + definitions
for callback in callbacks.split(','):
script += "register_notifier(" + callback + ");"
script += "</script>"
Expand Down

0 comments on commit 04fc0b3

Please sign in to comment.