Skip to content

Commit

Permalink
Update placeholder text for missing citation fields
Browse files Browse the repository at this point in the history
* Presence of the characters "<>" characters do not get rendered in generated email.
  • Loading branch information
jonavellecuerdo committed May 9, 2024
1 parent 53628b5 commit 4273374
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions solenoid/records/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def create_citation(paper_data):
The minimal citation is generated using the author's first name and last name
and the publication's title and journal (to which it was published).
If any of the citation fields are missing, the following placeholder text
will be used in the citation: "<[CITATION FIELD NAME] UNIDENTIFIED>".
will be used in the citation: "<CITATION FIELD NAME> UNIDENTIFIED".
Note: The citation field name will be formatted such that hyphens are removed
and all characters are uppercase.
Expand All @@ -83,7 +83,7 @@ def create_citation(paper_data):
Volume(Issue), pp.-pp. doi:XX.XXXXX.
We don't appear to get page number information, so we'll skip that.
"""
citation_field_placeholder = "<{field} UNIDENTIFIED>"
citation_field_placeholder = "{field} UNIDENTIFIED"

first_init = None
if first_name := paper_data[Fields.FIRST_NAME]:
Expand Down
2 changes: 1 addition & 1 deletion solenoid/records/tests/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ def test_create_citation_case_9(self):
self.assertEqual(
citation,
"Wilczek, F. (1973). Ultraviolet behavior of "
"non-abelian gauge theories. <JOURNAL-NAME UNIDENTIFIED>, "
"non-abelian gauge theories. JOURNAL-NAME UNIDENTIFIED, "
'30(26). <a href="https://doi.org/10.1103/PhysRevLett.30.1343">'
"doi:10.1103/PhysRevLett.30.1343</a>",
)
Expand Down

0 comments on commit 4273374

Please sign in to comment.