cubicweb/web/views/undohistory.py
branch3.26
changeset 12727 1853c5e13154
parent 11767 432f87a63057
equal deleted inserted replaced
12726:1a2c7d6397ec 12727:1853c5e13154
    43     def __init__(self, action_type='CUDAR'):
    43     def __init__(self, action_type='CUDAR'):
    44         assert not set(action_type) - set('CUDAR')
    44         assert not set(action_type) - set('CUDAR')
    45         self.action_type = action_type
    45         self.action_type = action_type
    46 
    46 
    47     def __str__(self):
    47     def __str__(self):
    48         return '%s(%s)' % (self.__class__.__name__, ', '.join(
    48         return '%s()' % (self.__class__.__name__)
    49             "%s=%v" % (str(k), str(v)) for k, v in kwargs.items() ))
       
    50 
    49 
    51     def __call__(self, cls, req, tx_action=None, **kwargs):
    50     def __call__(self, cls, req, tx_action=None, **kwargs):
    52         # tx_action is expected to be a transaction.AbstractAction
    51         # tx_action is expected to be a transaction.AbstractAction
    53         if not isinstance(tx_action, tx.AbstractAction):
    52         if not isinstance(tx_action, tx.AbstractAction):
    54             return 0
    53             return 0