File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed
app/server/static/components Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -264,7 +264,13 @@ export default {
264
264
})
265
265
.catch ((error ) => {
266
266
console .log (error); // eslint-disable-line no-console
267
- this .messages .push (' You cannot use same label name or shortcut key.' );
267
+ if (error .response .data .non_field_errors ) {
268
+ error .response .data .non_field_errors .forEach ((msg ) => {
269
+ this .messages .push (msg);
270
+ });
271
+ } else {
272
+ this .messages .push (' You cannot use same label name or shortcut key.' );
273
+ }
268
274
});
269
275
},
270
276
@@ -312,7 +318,13 @@ export default {
312
318
})
313
319
.catch ((error ) => {
314
320
console .log (error); // eslint-disable-line no-console
315
- this .messages .push (' You cannot use same label name or shortcut key.' );
321
+ if (error .response .data .non_field_errors ) {
322
+ error .response .data .non_field_errors .forEach ((msg ) => {
323
+ this .messages .push (msg);
324
+ });
325
+ } else {
326
+ this .messages .push (' You cannot use same label name or shortcut key.' );
327
+ }
316
328
});
317
329
},
318
330
You can’t perform that action at this time.
0 commit comments