Skip to content

Commit

Permalink
Modify chapter selection logic in add_profile view
Browse files Browse the repository at this point in the history
- Convert single chapter object to a list for consistent processing
- Ensure compatibility with existing chapter selection mechanism
  • Loading branch information
NagiPragalathan committed Feb 10, 2025
1 parent 9e64f3c commit 7c0a1d1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions base/views/Profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ def add_profile(request, username, dashboard=0):
try:
profile = MainProfile.objects.filter(user=request.user).first()
chapters = Chapter.objects.filter(name=profile.Chapter.id).first()
chapters = [chapters]
except Exception as e:
chapters = ChapterName.objects.all()

Expand Down

0 comments on commit 7c0a1d1

Please sign in to comment.