|
@@ -643,15 +643,10 @@ module.exports = function(crowi, app) {
|
|
|
.then(function(data) {
|
|
.then(function(data) {
|
|
|
pageData = data;
|
|
pageData = data;
|
|
|
|
|
|
|
|
- if (!req.form.isValid) {
|
|
|
|
|
- debug('Form data not valid');
|
|
|
|
|
- throw new Error('Form data not valid.');
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
if (data && !data.isUpdatable(currentRevision)) {
|
|
if (data && !data.isUpdatable(currentRevision)) {
|
|
|
debug('Conflict occured');
|
|
debug('Conflict occured');
|
|
|
- req.form.errors.push('page_edit.notice.conflict');
|
|
|
|
|
- throw new Error('Conflict.');
|
|
|
|
|
|
|
+ req.flash('dangerMessage', 'Conflict occured');
|
|
|
|
|
+ return res.redirect(req.headers.referer);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if (data) {
|
|
if (data) {
|