Skip to content

Commit

Permalink
profile fix (#77)
Browse files Browse the repository at this point in the history
Co-authored-by: Ishaan Mittal <[email protected]>
  • Loading branch information
mittal-ishaan and ishaan-tf authored Aug 30, 2024
1 parent 5016099 commit 7345603
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions home/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -470,9 +470,11 @@ def profile(request):
)
picture = "not available"
allocation: Allocation | None = Allocation.objects.filter(email=student).last()
show_allocated_enabled = AllocationForm.objects.filter(
show_allocated=True, period=allocation.period
).exists()
show_allocated_enabled = False
if allocation and allocation.period:
show_allocated_enabled = AllocationForm.objects.filter(
show_allocated=True, period=allocation.period
).exists()
allocation_info = {}
# improve this alignment of text to be shown on the profile section
if allocation and show_allocated_enabled:
Expand Down

0 comments on commit 7345603

Please sign in to comment.