politeia
politeia copied to clipboard
[cms] Fix the update of empty user owned proposals and supervisors
This diff solves a misbehaviour where we couldn't set the owned proposals and supervisors id fields back to empty. Now we check the updated fields agains't the previous records to see if there was any changes, and if so, continue with the update.
So change look ok I think, but we need to make sure now that cmswww or gui sends the value of the supervisorid or proposals owned field, since if they are empty on the request they will be cleared in the db
Hey mate @alexlyp good point. Updated cmswww
to send the previous user details for supervisorsIds and proposalsOwned if they were not set in the cmd.
Will make sure that politeiagui
does the same now :+1:
For the record, as per this discussion on riot, it was decided to create a custom action provider for the cms manage user route. Now, more complex fields to deal with like supervisor ids and proposals owned, can use them to be handled with more simplicity.