-
Notifications
You must be signed in to change notification settings - Fork 67
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
Added a new homepage element for Journals and HTML block. #1354
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice looks good now, added a couple of comments in line
src/core/homepage_elements/journals_and_html/plugin_settings.py
Outdated
Show resolved
Hide resolved
See comments. |
|
||
random.shuffle(journal_pks) | ||
for i in range(0, 6): | ||
sample_size = 6 if journals.count() > 6 else journals.count() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very minor: min(6, journals.count())
to avoid the double call to journals.count()
src/core/homepage_elements/journals_and_html/plugin_settings.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Closes #650