Changeset - b30577828f50
[Not reviewed]
0 1 0
Lance Edgar (lance) - 7 years ago 2018-02-22 12:24:53
lance@edbob.org
Don't consider a batch refreshable if it's marked complete
1 file changed with 7 insertions and 3 deletions:
0 comments (0 inline, 0 general)
rattail/batch/handlers.py
Show inline comments
 
@@ -223,13 +223,17 @@ class BatchHandler(object):
 
        """
 
        This method should return a boolean indicating whether or not the
 
        handler supports a "refresh" operation for the batch, given its current
 
        condition.  The default simply returns ``True`` but you may override as
 
        needed.
 
        condition.  The default assumes a refresh is allowed unless the batch
 
        is complete or executed.
 

	
 
        Note that this (currently) only affects the enabled/disabled state of
 
        the Refresh button within the Tailbone batch view.
 
        """
 
        return not bool(batch.executed)
 
        if batch.executed:
 
            return False
 
        if batch.complete:
 
            return False
 
        return True
 

	
 
    def progress_loop(self, *args, **kwargs):
 
        return progress_loop(*args, **kwargs)
0 comments (0 inline, 0 general)