politeia icon indicating copy to clipboard operation
politeia copied to clipboard

[cms] Fix the update of empty user owned proposals and supervisors

Open thi4go opened this issue 4 years ago • 3 comments

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.

thi4go avatar Jul 30 '20 14:07 thi4go

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

alexlyp avatar Jul 31 '20 19:07 alexlyp

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:

thi4go avatar Jul 31 '20 20:07 thi4go

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.

thi4go avatar Aug 12 '20 21:08 thi4go