SciPost Code Repository

Skip to content
Snippets Groups Projects
Commit 8a7b2a8b authored by George Katsikas's avatar George Katsikas :goat:
Browse files

fix publication metadata crash on first fetch

parent 55365261
No related branches found
No related tags found
No related merge requests found
...@@ -308,6 +308,8 @@ class Publication(models.Model): ...@@ -308,6 +308,8 @@ class Publication(models.Model):
for entry in indexed_author_list: for entry in indexed_author_list:
padded_entry = entry + [None] * (max_length - len(entry)) padded_entry = entry + [None] * (max_length - len(entry))
padded_list.append(padded_entry) padded_list.append(padded_entry)
else:
padded_list = []
# Save into the calculated field for future purposes. # Save into the calculated field for future purposes.
Publication.objects.filter(id=self.id).update( Publication.objects.filter(id=self.id).update(
cf_author_affiliation_indices_list=padded_list cf_author_affiliation_indices_list=padded_list
......
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