Commits

Jannis Leidel  committed 7f94ad5

Only add AX attribute to response if set.

  • Participants
  • Parent commits 6ee3f59

Comments (0)

Files changed (1)

File openid_provider/utils.py

     ax_resp = ax.FetchResponse(ax_req)
     if ax_req is not None:
         for attr in ax_req.getRequiredAttrs():
-            ax_resp.addValue(attr, ax_data.get(attr))
+            value = ax_data.get(attr, None)
+            if value is not None:
+                ax_resp.addValue(attr, value)
     oresponse.addExtension(ax_resp)
 
 def get_sreg_callback():