diff --git a/lms/djangoapps/badges/backends/badgr.py b/lms/djangoapps/badges/backends/badgr.py index 5d3beafc97c2..d96128beef21 100644 --- a/lms/djangoapps/badges/backends/badgr.py +++ b/lms/djangoapps/badges/backends/badgr.py @@ -189,13 +189,11 @@ def _create_assertion(self, badge_class, user, evidence_url): "identity": user.email, "type": "email" }, - "evidence": [ - { - "url": evidence_url - } - ], "notify": settings.BADGR_ENABLE_NOTIFICATIONS, } + if evidence_url: + data["evidence"] = [{"url": evidence_url}] + response = requests.post( self._assertion_url(badge_class.badgr_server_slug), headers=self._get_headers(),