datacite / lupo

DataCite REST API
https://api.datacite.org
MIT License
12 stars 8 forks source link

Fixes for activities endpoints. #1063

Closed svogt0511 closed 11 months ago

svogt0511 commented 12 months ago

Purpose

Should fix a several problems.

  1. The first is the https://github.com/datacite/lupo/issues/1054, where trying to retrieve activities for a DOI would cause a 'NoMethodError: undefined method 'name' for nil:NilClass' error when trying to display activities using /dois/:id/activities endpoint older DOIs in production. This was a problem in the serializer.
  2. Added a fix for https://github.com/datacite/lupo/issues/1060 where the /activities/:uid endpoint would always return not found. Turns out it was not implemented.
  3. This is the same as item 1, described, above: https://github.com/datacite/lupo/issues/1062
  4. Minor fix for the dev environment setup so activities can successfully be tested manually: https://github.com/datacite/lupo/issues/1065
  5. Also found it necessary in the activities serializer to guard to guard against audited changes that show an initial value of null for publisher or publisher_obj. This happens when these fields are first assigned a value. An example be found in the audit date for https://api.datacite.org/activities/7b333de3-77af-4200-8ffd-c8b2012a8d9e:
image

closes: https://github.com/datacite/lupo/issues/1054, https://github.com/datacite/lupo/issues/1060, https://github.com/datacite/lupo/issues/1062, https://github.com/datacite/lupo/issues/1065

Approach

Open Questions and Pre-Merge TODOs

Learning

Types of changes

Reviewer, please remember our guidelines: