SciPost Code Repository

Skip to content
Snippets Groups Projects
Commit 17ab59cf authored by Jean-Sébastien Caux's avatar Jean-Sébastien Caux
Browse files

Fix bug if expertises is None

parent b0853229
No related branches found
No related tags found
No related merge requests found
...@@ -290,15 +290,17 @@ class Contributor(models.Model): ...@@ -290,15 +290,17 @@ class Contributor(models.Model):
def expertises_as_ul(self): def expertises_as_ul(self):
output = '<ul>' output = '<ul>'
for exp in self.expertises: if self.expertises:
output += '<li>%s</li>' % subject_areas_dict[exp] for exp in self.expertises:
output += '<li>%s</li>' % subject_areas_dict[exp]
output += '</ul>' output += '</ul>'
return mark_safe(output) return mark_safe(output)
def expertises_as_string(self): def expertises_as_string(self):
output = '' output = ''
for exp in self.expertises: if self.expertises:
output += subject_areas_dict[exp] + ', ' for exp in self.expertises:
output += subject_areas_dict[exp] + ', '
return output return output
def assignments_summary_as_td(self): def assignments_summary_as_td(self):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment