String states (like "Revoked") are prone to typos and are not checked. It would be a good idea to move to globally defined values instead. (xxx is states.REVOKED rather than xxx == "Revoked")