Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: correctly hand out sticky vs individual sticky labels #1744

Merged
merged 1 commit into from
Jan 24, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions intranet/apps/eighth/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@ def process_scheduled_activity(
name_with_flags = prefix + middle + suffix
name_with_flags_for_user = prefix + (middle if restricted_for_user else "") + suffix

is_activity_sticky = scheduled_activity.is_activity_sticky()

activity_info = {
"id": activity.id,
"aid": activity.aid,
Expand Down Expand Up @@ -154,8 +156,8 @@ def process_scheduled_activity(
"administrative": scheduled_activity.get_administrative(),
"presign": activity.presign,
"presign_time": scheduled_activity.is_too_early_to_signup()[1].strftime("%A, %B %-d at %-I:%M %p"),
"sticky": scheduled_activity.is_activity_sticky(),
"user_sticky": scheduled_activity.is_user_stickied(user),
"sticky": is_activity_sticky,
"user_sticky": scheduled_activity.is_user_stickied(user) and not is_activity_sticky,
"finance": "", # TODO: refactor JS to remove this
"title": scheduled_activity.title,
"comments": scheduled_activity.comments, # TODO: refactor JS to remove this
Expand Down
Loading