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

Handle missing contact address in project_submission #2178

Merged
merged 1 commit into from
Jan 18, 2024

Conversation

bemoody
Copy link
Collaborator

@bemoody bemoody commented Jan 16, 2024

Pull #2156 introduced the PROJECT_EDITOR_EMAIL setting.

If this setting is not defined (or blank) then we want to fall back to the old behavior of showing the assigned editor's email address.

However, if the project has not yet been assigned to an editor, and PROJECT_EDITOR_EMAIL is blank, it would crash.

(For example, clear the PROJECT_EDITOR_EMAIL setting, then log in as rgmark and try to submit the "MIMIC-III Clinical Database" project.)

On the submission page we display a contact address for the project
editor, if one has been assigned.  If no editor has yet been assigned,
then the "contact_email" won't be shown.

However, if no editor has yet been assigned (self.editor is None) and
there is no PROJECT_EDITOR_EMAIL defined, the previous code would
crash.

Put this logic into the model class, not the view, and document it.
@tompollard
Copy link
Member

thanks for catching this

@tompollard tompollard merged commit ac23bf7 into dev Jan 18, 2024
11 checks passed
@tompollard tompollard deleted the bm/missing-editor-email branch January 18, 2024 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants