Skip to content

Commit

Permalink
maint: Remove redundant code
Browse files Browse the repository at this point in the history
  • Loading branch information
RogerSelwyn committed Oct 25, 2024
1 parent 09c81e0 commit eebb8b6
Showing 1 changed file with 1 addition and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,7 @@ def get_hass_date(obj, is_all_day):

def get_end_date(obj):
"""Get the end date."""
if hasattr(obj, "end"):
return obj.end

if hasattr(obj, "duration"):
return obj.start + obj.duration.value

return obj.start + timedelta(days=1)
return obj.end


def get_start_date(obj):
Expand Down

0 comments on commit eebb8b6

Please sign in to comment.