Skip to content

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

Open
thi4go wants to merge 6 commits into
decred:masterfrom
thi4go:fix-empty-set
Open

[cms] Fix the update of empty user owned proposals and supervisors#1267
thi4go wants to merge 6 commits into
decred:masterfrom
thi4go:fix-empty-set

Conversation

@thi4go

@thi4go thi4go commented Jul 30, 2020

Copy link
Copy Markdown
Member

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.

@alexlyp

alexlyp commented Jul 31, 2020

Copy link
Copy Markdown
Member

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

@thi4go

thi4go commented Jul 31, 2020

Copy link
Copy Markdown
Member Author

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 👍

@thi4go thi4go changed the title [cms] Fix the update of empty user owned proposals and supervisors wip: [cms] Fix the update of empty user owned proposals and supervisors Jul 31, 2020
@thi4go

thi4go commented Aug 12, 2020

Copy link
Copy Markdown
Member Author

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 thi4go changed the title wip: [cms] Fix the update of empty user owned proposals and supervisors [cms] Fix the update of empty user owned proposals and supervisors Aug 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants