Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use resource_type_id instead of types.resourceTypeGeneral when filtering #1036

Merged
merged 7 commits into from
Nov 3, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Use types.present?
jrhoads committed Nov 2, 2023
commit 8899d630abb3a6fe8cb071802204917797ba467a
2 changes: 1 addition & 1 deletion app/models/doi.rb
Original file line number Diff line number Diff line change
@@ -2371,7 +2371,7 @@ def self.add_index_type(options = {})

# QUICK FIX UNTIL PROJECT IS A RESOURCE_TYPE_GENERAL IN THE SCHEMA
def handle_resource_type(types)
if !types.nil? && types["resourceType"] == "Project" && (types["resourceTypeGeneral"] == "Text" || types["resourceTypeGeneral"] == "Other")
if types.present? && types["resourceType"] == "Project" && (types["resourceTypeGeneral"] == "Text" || types["resourceTypeGeneral"] == "Other")
"Project"
else
types.to_h["resourceTypeGeneral"]