See KSP-CKAN/NetKAN-Infra#293 and KSP-CKAN/NetKAN-Infra#294, the shared_authors property sent to CKAN just says username, so we can't use it to add the co-authors to pull requests.
Cause
435 was mis-guided; I thought the data sent to CKAN was in JSON format, but it's in POST form input format, which means it can only handle strings and lists of strings, not more complex data structures. That PR tried to send a list of dicts in the shared_authors property, which can't work.
Changes
Now shared_authors is no longer sent
Now Mod.all_authors provides the main author and all the co-authors for convenience
Now these POST form inputs are lists with one element per (co-)author:
username
user_github
user_forum_id
user_forum_username
email
user_url (which was missed in #435 anyway)
On the CKAN side, request.form.get will return just the first element of the list, which ensures backwards compatibility, and request.form.getlist will return the entire list, which will allow a future update to get the data for all of the authors.
Problem
See KSP-CKAN/NetKAN-Infra#293 and KSP-CKAN/NetKAN-Infra#294, the
shared_authors
property sent to CKAN just saysusername
, so we can't use it to add the co-authors to pull requests.Cause
435 was mis-guided; I thought the data sent to CKAN was in JSON format, but it's in POST form input format, which means it can only handle strings and lists of strings, not more complex data structures. That PR tried to send a list of dicts in the
shared_authors
property, which can't work.Changes
shared_authors
is no longer sentMod.all_authors
provides the main author and all the co-authors for convenienceusername
user_github
user_forum_id
user_forum_username
email
user_url
(which was missed in #435 anyway)On the CKAN side,
request.form.get
will return just the first element of the list, which ensures backwards compatibility, andrequest.form.getlist
will return the entire list, which will allow a future update to get the data for all of the authors.