Merge pull request #2350 from Luis-Fernando-Molina/develop

Contribution: Bug Fixed Governance
This commit is contained in:
Luis Fernando Molina authored and GitHub committed 2021-10-30 06:31:39 -04:00
commit b8760cdcda
1 file changed
+2
@@ -281,6 +281,8 @@ function newGovernanceFunctionLibraryVotingProgram() {
Here we will validate that users can not vote for their own claims.
*/
let votedUserProfile = UI.projects.visualScripting.utilities.hierarchy.getHiriarchyHead(node.payload.referenceParent)
if (votedUserProfile === undefined || userProfile === undefined) { return }
if (votedUserProfile.id === userProfile.id) {
node.payload.uiObject.setErrorMessage('Voting your own claims is not allowed.')
return