Skip to content
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

Fix some incorrect url_for definitions #420

Merged
merged 2 commits into from Apr 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion critiquebrainz/frontend/templates/review/entity/work.html
Expand Up @@ -17,7 +17,7 @@ <h2 id="title">

{{ _('%(work)s', work=work_name) }}

{% if work['life-span'] %}
{% if work['life-span'] is defined %}
<small>{{ work['life-span']['begin'][:4] }}</small>
{% endif %}
</h2>
Expand Down
2 changes: 1 addition & 1 deletion critiquebrainz/frontend/views/artist.py
Expand Up @@ -65,7 +65,7 @@ def entity(id):
raise BadRequest("Invalid page number!")

if page < 1:
return redirect(url_for('.reviews'))
return redirect(url_for('artist.entity', id=id))
release_groups_offset = (page - 1) * BROWSE_RELEASE_GROUPS_LIMIT
release_groups, release_group_count = mb_release_group.browse_release_groups(
artist_id=artist['mbid'],
Expand Down
2 changes: 1 addition & 1 deletion critiquebrainz/frontend/views/work.py
Expand Up @@ -47,7 +47,7 @@ def entity(id):
raise BadRequest("Invalid page number!")

if page < 1:
return redirect(url_for('.reviews'))
return redirect(url_for('work.entity', id=id))

recording_rels = work['recording-rels']
recording_count = len(recording_rels)
Expand Down