Skip to content

Commit 74b289e

Browse files
authored
Merge pull request #1244 from Crown-Commercial-Service/feature/nrmi-252-add-archiving-error-messaging
NRMI-252 update
2 parents 6ab5aee + 9f5ed3a commit 74b289e

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

app/controllers/admin/frameworks_controller.rb

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ def publish
8080

8181
def archive_confirmation; end
8282

83-
# rubocop:disable Metrics/AbcSize
8483
def archive
8584
@framework.errors.clear
8685

@@ -89,15 +88,14 @@ def archive
8988
return redirect_to admin_framework_path(@framework)
9089
end
9190

92-
if @framework.archive
91+
if @framework.archive!
9392
flash[:success] = 'Framework archived successfully.'
9493
else
95-
flash[:failure] = @framework.errors.full_messages.to_sentence.presence || 'Error archiving framework.'
94+
flash[:failure] = 'Error archiving framework: FDL does not pass validation.'
9695
end
9796

9897
redirect_to admin_framework_path(@framework)
9998
end
100-
# rubocop:enable Metrics/AbcSize
10199

102100
def unarchive_confirmation; end
103101

0 commit comments

Comments
 (0)