Worker update endpoints
Requires !2189 (merged), closes #1644 (closed)
-
The serializers have been reorganized to let the special handling in
CreateWorker
be separate from the rest of the APIs and make the update endpoint easier to implement. -
I added
Worker.description
toRetrieveWorker
since it wasn't exposed anywhere yet. -
Unlike with
CreateWorker
,[Partial]UpdateWorker
does not automatically create a WorkerType if it does not exist, since that wasn't required anywhere in the original issues. We could have some generic code for both creation and updates that tries to handle this though. -
The
ListRepositories
andRetrieveRepository
endpoint include a list of workers, and they were using theWorkerSerializer
for this, which included a redundantrepository_id
. I made them use theWorkerLightSerializer
instead, which does not include therepository_id
or thedescription
. The only code using this workers list is the frontend, where only the ID and name are used, so it doesn't matter.