Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

fix(#1701): Events page displays year for events scheduled to start or end at a future year #2500

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

Merged
merged 15 commits into from
Sep 26, 2024
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Handle Case When Call To Next Event Returns None
  • Loading branch information
alvindera97 committed Apr 9, 2022
commit aa4d55b04970ea02e24df1af3000f7b22d6f9d23
12 changes: 4 additions & 8 deletions 12 events/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,21 +182,17 @@ def next_time(self):
return None

def is_scheduled_to_start_this_year(self) -> bool:
current_year: int = datetime.datetime.now().year
try:
if self.next_time:
current_year: int = datetime.datetime.now().year
if self.next_time.dt_start.year == current_year:
return True
except Exception:
pass
return False

def is_scheduled_to_end_this_year(self) -> bool:
current_year: int = datetime.datetime.now().year
try:
if self.next_time:
current_year: int = datetime.datetime.now().year
if self.next_time.dt_end.year == current_year:
return True
except Exception:
pass
return False

@property
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.