Esempio n. 1
0
 def create(cls, principal, agent, scope, replay=True):
     from adhocracy.lib.democracy import Decision
     delegation = Delegation(principal, agent, scope)
     meta.Session.add(delegation)
     meta.Session.flush()
     if replay:
         log.debug("Replaying the vote for Delegation: %s" % delegation)
         Decision.replay_decisions(delegation)
     return delegation
Esempio n. 2
0
 def create(cls, principal, agent, scope, replay=True):
     from adhocracy.lib.democracy import Decision
     delegation = Delegation(principal, agent, scope)
     meta.Session.add(delegation)
     meta.Session.flush()
     if replay:
         log.debug("Replaying the vote for Delegation: %s" % delegation)
         Decision.replay_decisions(delegation)
     return delegation