def is_overriden_by_own_decision(delegation): if not hasattr(delegation.scope, 'poll'): return True # scope doesn't have polls -> can't self decide if delegation.scope.poll is None: # currently no poll in this cope -> can't self decide return True decision = Decision(delegation.principal, delegation.scope.poll) return not decision.is_self_decided()
def is_overriden_by_own_decision(delegation): if not hasattr(delegation.scope, 'poll'): return True # scope doesn't have polls -> can't self decide if delegation.scope.poll is None: return True # currently no poll in this cope -> can't # self decide decision = Decision(delegation.principal, delegation.scope.poll) return not decision.is_self_decided()