diff --git a/api/models.py b/api/models.py index 3a8d5398..de799c46 100644 --- a/api/models.py +++ b/api/models.py @@ -145,7 +145,7 @@ def last_highstate(self): # Get all potential jobs. states = SaltReturns.objects.filter( Q(fun="state.apply") | Q(fun="state.highstate"), id=self.minion_id - ).order_by('-jid')[0:2] + ).order_by("-jid")[0:2] states = sorted(states, key=lambda x: x.jid) # Remove jobs with arguments. diff --git a/docker/saltconfig/salt/auth/alcali.py b/docker/saltconfig/salt/auth/alcali.py index dec9d6fe..7a0b48ee 100644 --- a/docker/saltconfig/salt/auth/alcali.py +++ b/docker/saltconfig/salt/auth/alcali.py @@ -87,7 +87,7 @@ def _get_options(): # post processing for k, v in defaults.items(): - if isinstance(v, six.string_types) and v.lower() == "none": + if isinstance(v, str) and v.lower() == "none": # Ensure 'None' is rendered as None _options[k] = None if k == "port":