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

fix: updating condition to not show empty session in user section #7465

Merged
merged 1 commit into from
Nov 25, 2020
Merged
Changes from all commits
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
2 changes: 1 addition & 1 deletion app/api/speakers.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ def before_update_object(self, speaker, data, view_kwargs):
'Organizer access required to override email',
)
if (
data.get('is_email_overridden')
not data.get('is_email_overridden')
Copy link
Member

Choose a reason for hiding this comment

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

When did this happen?

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 email is overriden then there will be no email so email is null m but here are condition that is saying that if email is overriden and email is null then set it to user mail, while it should be, while email is not overriden and email is null set it to user mail

Copy link
Member

Choose a reason for hiding this comment

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

@maze-runnar You changed this but didn't make email optional in schema

This is causing fossasia/open-event-frontend#5841

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@maze-runnar You changed this but didn't make email optional in schema

This is causing fossasia/open-event-frontend#5841

@iamareebjamal that is related to PR #7469, and I have made email optional but still showing that error.

and has_access('is_organizer', event_id=speaker.event_id)
and not data.get('email')
):
Expand Down