Skip to content

Commit

Permalink
Update lib/bag_adapter.rb
Browse files Browse the repository at this point in the history
Co-authored-by: Sam Sciolla <[email protected]>
  • Loading branch information
jayamala17 and ssciolla authored Aug 6, 2024
1 parent 29920c0 commit 60cf3ba
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions lib/bag_adapter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,10 @@ def add_manifests

def check_if_valid
is_valid = @bag.valid?
if is_valid
ValidationResult.new(is_valid: is_valid, error_message: nil)
else
ValidationResult.new(
is_valid: is_valid,
error_message: @bag.errors.full_messages.join(", ")
)
ValidationResult.new(
is_valid: is_valid,
error_message: is_valid ? nil : @bag.errors.full_messages.join(", ")
)
end
end
end
Expand Down

0 comments on commit 60cf3ba

Please sign in to comment.