File tree 2 files changed +6
-2
lines changed
invenio_rdm_records/assets/semantic-ui/js/invenio_rdm_records/src/deposit
2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -369,7 +369,7 @@ export class RDMDepositRecordSerializer extends DepositRecordSerializer {
369
369
// Form/Error UX is tackled in next sprint and this is good
370
370
// enough for now.
371
371
for ( const e of errors ) {
372
- if ( "severity" in e && e . severity !== "error" ) {
372
+ if ( "severity" in e && " severity" in e ) {
373
373
// New error format with severity and description
374
374
_set ( deserializedErrors , e . field , {
375
375
message : e . messages . join ( " " ) ,
Original file line number Diff line number Diff line change @@ -201,9 +201,13 @@ class DisconnectedFormFeedback extends Component {
201
201
...severityChecks ,
202
202
} ) ;
203
203
204
+ const noSeverityChecksWithErrors = Object . values ( severityChecks ) . every (
205
+ ( severityObject ) => severityObject . severity !== "error"
206
+ ) ;
207
+
204
208
// Determine final feedback without reassigning
205
209
const feedback =
206
- errorSections && _isEmpty ( flattenedErrors ) && ! _isEmpty ( severityChecks )
210
+ errorSections && _isEmpty ( flattenedErrors ) && noSeverityChecksWithErrors
207
211
? "suggestive"
208
212
: initialFeedback ;
209
213
You can’t perform that action at this time.
0 commit comments