mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2024-11-14 16:55:42 +00:00
Fix issues
This commit is contained in:
parent
3e9d749574
commit
a822a2e3a0
@ -48,10 +48,12 @@ def user(user_id):
|
||||
def edit_user(user_id):
|
||||
user = User.query.get_or_404(user_id)
|
||||
admin_edit_user_form = AdminEditUserForm(
|
||||
obj=user,
|
||||
prefix='admin-edit-user-form'
|
||||
)
|
||||
edit_general_settings_form = EditGeneralSettingsForm(
|
||||
user,
|
||||
obj=user,
|
||||
prefix='edit-general-settings-form'
|
||||
)
|
||||
edit_notification_settings_form = EditNotificationSettingsForm(
|
||||
@ -81,8 +83,6 @@ def edit_user(user_id):
|
||||
db.session.commit()
|
||||
flash('Your changes have been saved')
|
||||
return redirect(url_for('.edit_user', user_id=user.id))
|
||||
admin_edit_user_form.prefill(user)
|
||||
edit_general_settings_form.prefill(user)
|
||||
edit_notification_settings_form.prefill(user)
|
||||
return render_template(
|
||||
'admin/edit_user.html.j2',
|
||||
|
@ -432,7 +432,7 @@ class Utils {
|
||||
fetch(`/contributions/tesseract-ocr-pipeline-models/${tesseractOCRPipelineModel.id}/toggle-public-status`, {method: 'POST', headers: {Accept: 'application/json'}})
|
||||
.then(
|
||||
(response) => {
|
||||
app.flash(msg, 'corpus');
|
||||
app.flash(msg);
|
||||
resolve(response);
|
||||
},
|
||||
(response) => {
|
||||
@ -453,16 +453,16 @@ class Utils {
|
||||
msg = `Model "${spaCyNLPPipelineModel.title}" is now private`;
|
||||
}
|
||||
fetch(`/contributions/spacy-nlp-pipeline-models/${spaCyNLPPipelineModel.id}/toggle-public-status`, {method: 'POST', headers: {Accept: 'application/json'}})
|
||||
.then(
|
||||
(response) => {
|
||||
app.flash(msg, 'corpus');
|
||||
resolve(response);
|
||||
},
|
||||
(response) => {
|
||||
if (response.status === 403) {app.flash('Forbidden', 'error');}
|
||||
reject(response);
|
||||
}
|
||||
);
|
||||
.then(
|
||||
(response) => {
|
||||
app.flash(msg);
|
||||
resolve(response);
|
||||
},
|
||||
(response) => {
|
||||
if (response.status === 403) {app.flash('Forbidden', 'error');}
|
||||
reject(response);
|
||||
}
|
||||
);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user