Skip to content

Commit

Permalink
publication_detail_settings is now a static method
Browse files Browse the repository at this point in the history
  • Loading branch information
ajrbyers authored and StephDriver committed Nov 5, 2024
1 parent ffc5a01 commit 57cb535
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/submission/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -906,13 +906,14 @@ def metrics(self):
def has_galley(self):
return self.galley_set.all().exists()

@staticmethod
@cache(600)
def publication_detail_settings(self):
display_date_accepted = self.journal.get_setting(
def publication_detail_settings(journal):
display_date_accepted = journal.get_setting(
group_name='article',
setting_name='display_date_accepted',
)
display_date_submitted = self.journal.get_setting(
display_date_submitted = journal.get_setting(
group_name='article',
setting_name='display_date_submitted',
)
Expand All @@ -921,7 +922,7 @@ def publication_detail_settings(self):
@property
def has_publication_details(self):
"""Determines if an article has publication details override"""
display_date_submitted, display_date_accepted = self.publication_detail_settings()
display_date_submitted, display_date_accepted = self.publication_detail_settings(self.journal)
return(
self.page_range
or self.article_number
Expand Down

0 comments on commit 57cb535

Please sign in to comment.