File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -256,7 +256,8 @@ def get(session):
256
256
if user_data :
257
257
# User is logged in; show profile and logout buttons
258
258
name = H4 (user_data ['data' ]['attributes' ]['full_name' ],cls = "card-title text-2xl" )
259
- email = user_data ['data' ]['attributes' ]['email' ]
259
+ email = user_data .get ('data' , {}).get ('attributes' , {}).get ('email' )
260
+
260
261
logout_button = A ("Logout" , href = "/logout" , cls = "btn btn-sm btn-secondary m-1" )
261
262
profile_image = Img (src = user_data ['data' ]['attributes' ]['thumb_url' ])
262
263
@@ -314,7 +315,8 @@ def get(session):
314
315
if user_data :
315
316
# User is logged in; show profile and logout buttons
316
317
name = H3 (user_data ['data' ]['attributes' ]['full_name' ],cls = "card-title" )
317
- email = user_data ['data' ]['attributes' ]['email' ]
318
+ email = user_data .get ('data' , {}).get ('attributes' , {}).get ('email' )
319
+
318
320
logout_button = A ("Logout" , href = "/logout" , cls = "btn btn-sm btn-secondary m-1" )
319
321
profile_image = Img (src = user_data ['data' ]['attributes' ]['thumb_url' ])
320
322
You can’t perform that action at this time.
0 commit comments