-
Notifications
You must be signed in to change notification settings - Fork 510
Notify event creation for cloned events #6744
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
Notify event creation for cloned events #6744
Conversation
0a766a9 to
1e8f12a
Compare
indico/modules/events/operations.py
Outdated
| 'timezone': event.timezone, | ||
| 'title': event.title, | ||
| 'description': event.description, | ||
| 'description': event.description or '', |
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.
@ThiefMaster, this fixes the issue with the empty description section but I'm not sure if this is the best place to fix it. Calling event.description when the description is empty returns RichMarkup('') and assigning that to the new event causes RichMarkup to add the extra preformatted wrapper RichMarkup('<div class="preformatted"></div>')
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.
i think you could also just use event._description there to avoid triggering any special RichMarkup logic
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.
i recommend also cloning the render_mode in that case. right now it's always HTML but we have a PR to support markdown there and then it'll be important to preserve both the original description and the render mode
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.
In the RenderModeMixin the default isreturn cls.default_render_mode is returned when there is only one possible option so nothing is being stored right now
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.
ah, forgot about that. nevermind then
1e8f12a to
6b913eb
Compare
6b913eb to
9491d92
Compare
9491d92 to
52c9419
Compare
There is still the issue of an empty description section being present in the notification email of the cloned event due to the added wrapper
RichMarkup('<div class="preformatted"></div>')