Node.js based forum software built for the modern web
test: possible fix random psql test failure
Barış Soner Uşaklı50ed3a324ca1
diff --git a/src/controllers/authentication.js b/src/controllers/authentication.jsindex e71ff710d7..cf2d6a55a4 100644--- a/src/controllers/authentication.js+++ b/src/controllers/authentication.js@@ -182,7 +182,9 @@ authenticationController.registerComplete = async function (req, res) {const errors = results.map(result => result.status === 'rejected' && result.reason && result.reason.message).filter(Boolean);if (errors.length) {req.flash('errors', errors);- return res.redirect(`${nconf.get('relative_path')}/register/complete`);+ return req.session.save(() => {+ res.redirect(`${nconf.get('relative_path')}/register/complete`);+ });}if (req.session.registration.register === true) {