mattia / pagure

Forked from pagure 3 years ago
Clone

138ab4d Allow priorities and milestones to be 0 or -1

Authored and Committed by pingou 6 years ago
    Allow priorities and milestones to be 0 or -1
    
    Up until now priorities could not be 0 or -1, not 0 because we weren't
    explicitly when doing ``if issue.priority`` and not ``-1`` because it was
    a reserved value that meant to say: neither a value nor None.
    
    With this change, the default value is a random object which allows us
    to set the value to anything we like including ``None`` (which means
    resetting the priority).
    
    Fixes https://pagure.io/pagure/issue/2482
    Fixes https://pagure.io/pagure/issue/1888
    
    Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>
    
        
file modified
+30 -6
file modified
+1 -1
file modified
+5 -3