-
Notifications
You must be signed in to change notification settings - Fork 25
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
base: main
Are you sure you want to change the base?
Conversation
creme/activities/forms/config.py
Outdated
'not be displayed' | ||
).format( | ||
start=date_format(view_day_start, 'TIME_FORMAT'), | ||
end=date_format(view_day_end, 'TIME_FORMAT'), |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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 🤔
creme/activities/forms/config.py
Outdated
@@ -68,6 +68,35 @@ def clean(self, *args, **kwargs): | |||
) | |||
) | |||
|
|||
if view_day_start != view_day_end: |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
…wanted hidden events
f89c822
to
15a06e0
Compare
No description provided.