Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
RDMS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
researchdata
RDMS
Commits
36a25275
Commit
36a25275
authored
9 months ago
by
Anusha Ranganathan
Browse files
Options
Downloads
Patches
Plain Diff
Fix for no method error. Check attributes exist
parent
9120e3d1
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!310
Fix for no method error. Check attributes exist
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
hyrax/app/models/concerns/s3_file_handleable.rb
+22
-6
22 additions, 6 deletions
hyrax/app/models/concerns/s3_file_handleable.rb
with
22 additions
and
6 deletions
hyrax/app/models/concerns/s3_file_handleable.rb
+
22
−
6
View file @
36a25275
...
...
@@ -265,13 +265,27 @@ module S3FileHandleable
complex_people
.
each
do
|
person
|
full_name
=
[]
full_name
<<
person
.
last_name
[
0
].
strip
last_names
<<
person
.
last_name
[
0
].
strip
full_name
<<
person
.
first_name
[
0
].
strip
first_names
<<
person
.
first_name
[
0
].
strip
names
<<
full_name
.
join
(
', '
)
if
person
.
last_name
.
any?
and
person
.
last_name
.
first
.
present?
full_name
<<
person
.
last_name
[
0
].
strip
last_names
<<
person
.
last_name
[
0
].
strip
else
full_name
<<
""
last_names
<<
""
end
if
person
.
first_name
.
any?
and
person
.
first_name
.
first
.
present?
full_name
<<
person
.
first_name
[
0
].
strip
first_names
<<
person
.
first_name
[
0
].
strip
else
first_names
<<
""
end
names
<<
full_name
.
join
(
', '
)
if
full_name
.
any?
name_types
<<
"Personal"
affiliations
<<
person
.
affiliation
[
0
].
strip
if
person
.
affiliation
.
any?
and
person
.
affiliation
.
first
.
present?
affiliations
<<
person
.
affiliation
[
0
].
strip
else
affiliations
<<
""
end
if
person
.
orcid
.
any?
and
person
.
orcid
.
first
.
present?
name_identifiers
<<
person
.
orcid
[
0
].
strip
...
...
@@ -285,6 +299,8 @@ module S3FileHandleable
if
person
.
role
.
any?
and
person
.
role
.
first
.
present?
roles
<<
person
.
role
[
0
].
strip
else
roles
<<
""
end
end
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment