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

Forbid visible day range to be within the working hours to prevent unwanted hidden events #918

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

joehybird
Copy link
Contributor

No description provided.

@joehybird joehybird added the bug Something isn't working label Feb 20, 2025
@joehybird joehybird requested a review from genglert February 20, 2025 16:18
@joehybird joehybird self-assigned this Feb 20, 2025
'not be displayed'
).format(
start=date_format(view_day_start, 'TIME_FORMAT'),
end=date_format(view_day_end, 'TIME_FORMAT'),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure "view_day_end" cannot be None here?

Copy link
Contributor Author

@joehybird joehybird Feb 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Default is time(0, 0, 0) in database model. But in this case I wonder 🤔

@@ -68,6 +68,35 @@ def clean(self, *args, **kwargs):
)
)

if view_day_start != view_day_end:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hum if start & end are "7pm", the range has a 0-duration (I presume it would be an issue), isn't it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if the range as 0-duration I assume that is a 24h duration. But an error if start & end are not the default values (00:00) could be a good idea.

Copy link
Contributor Author

@joehybird joehybird Feb 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The same problem can happen for the working hours range too.

@joehybird joehybird force-pushed the fix/calendar_view_range_validation branch from f89c822 to 15a06e0 Compare February 21, 2025 13:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants