Skip to content

Commit

Permalink
Merge branch 'main' into task/WP-790--disable-non-corral-trash
Browse files Browse the repository at this point in the history
  • Loading branch information
jarosenb authored Jan 29, 2025
2 parents d684ebf + e386a6d commit e9e7d55
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
13 changes: 10 additions & 3 deletions designsafe/apps/api/projects_v2/operations/datacite_operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ def get_datacite_json(
"""

datacite_json = {}
is_other = pub_graph.nodes["NODE_ROOT"].get("projectType", None) == "other"
is_other = pub_graph.nodes["NODE_ROOT"].get("projectType", None) in [
"other",
"field_research",
]
if is_other:
base_meta_node = next(
(
Expand Down Expand Up @@ -49,10 +52,14 @@ def get_datacite_json(
author_attr = []
institutions = []
entity_meta = pub_graph.nodes[entity_node]["value"]
for author in entity_meta.get("authors", []):
authors = entity_meta.get("authors", [])
datacite_authors = [
author for author in authors if not author.get("authorship") is False
]
for author in datacite_authors:
author_attr.append(
{
"nameType": "Personal",
"name": f"{author.get('lname', '')}, {author.get('fname', '')}",
"givenName": author.get("fname", ""),
"familyName": author.get("lname", ""),
}
Expand Down
1 change: 1 addition & 0 deletions designsafe/apps/workspace/api/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -768,6 +768,7 @@ def _submit_job(self, request, body, tapis, username):
"X-Tapis-Tracking-ID": f"portals.{request.session.session_key}"
},
)
job_post["parameterSet"]["envVariables"].append({"key": "_TAS_DIR", "value": tasdir})

# Add webhook subscription for job status updates
job_post["subscriptions"] = job_post.get("subscriptions", []) + [
Expand Down

0 comments on commit e9e7d55

Please sign in to comment.