Fix some problems after merge

This commit is contained in:
Patrick Jentsch 2023-02-09 12:02:00 +01:00
parent 66fbf4d57b
commit 52fa23ff65
2 changed files with 4 additions and 3 deletions

View File

@ -80,10 +80,11 @@ def corpus(corpus_id):
title='Corpus'
)
else:
print('public')
corpus_files = [x.to_json_serializeable() for x in corpus.files]
return render_template(
'corpora/corpus_public.html.j2',
corpus=corpus,
corpus_files=corpus_files,
title='Corpus'
)

View File

@ -76,7 +76,7 @@
if (response.status === 404) {app.flash('Not Found', 'error'); reject(response);}
{# app.flash(`You are not following "{{ corpus.title }}" anymore`, 'corpus'); #}
resolve(response);
window.location.href = '{{ url_for("corpora.public_corpus", corpus_id=corpus.id) }}';
window.location.href = '{{ url_for("corpora.corpus", corpus_id=corpus.id) }}';
},
(response) => {
app.flash('Something went wrong', 'error');
@ -92,7 +92,7 @@
if (response.status === 403) {app.flash('Forbidden', 'error'); reject(response);}
if (response.status === 404) {app.flash('Not Found', 'error'); reject(response);}
{# app.flash(`You follow "{{ corpus.title }}" now`, 'corpus'); #}
window.location.href = '{{ url_for("corpora.public_corpus", corpus_id=corpus.id) }}';
window.location.href = '{{ url_for("corpora.corpus", corpus_id=corpus.id) }}';
resolve(response);
},
(response) => {