Skip to content

Commit

Permalink
Modify renewal message logic for admin users in common_data view
Browse files Browse the repository at this point in the history
- Update renewal message display to show for admin users when unauthenticated
- Simplify conditional logic for setting renewal message
  • Loading branch information
NagiPragalathan committed Feb 10, 2025
1 parent fd34387 commit 05b2249
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
Binary file modified base/views/__pycache__/common.cpython-312.pyc
Binary file not shown.
3 changes: 1 addition & 2 deletions base/views/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,14 +305,13 @@ def common_data(request):
'usr_name': "No name",
'unseen_messages_count': 0,
'unseen_messages': [],
'renewal_message': 0, # No renewal message for unauthenticated users
'renewal_message': 1 if is_admin else 0, # No renewal message for unauthenticated users
'days_left_for_renewal': 0, # No days left calculation for unauthenticated users
'usr_img': 'none',
'main_profile': None,
'bio': None,
'contact': None,
'is_admin': is_admin

})

print(context)
Expand Down

0 comments on commit 05b2249

Please sign in to comment.