Sfoglia il codice sorgente

Fix in literal identity check which happened to work.

Signed-off-by: Nashwan Azhari <nazhari@cloudbasesolutions.com>
Nashwan Azhari 2 anni fa
parent
commit
86c23b70a0
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      coriolis/conductor/rpc/server.py

+ 1 - 1
coriolis/conductor/rpc/server.py

@@ -395,7 +395,7 @@ class ConductorServerEndpoint(object):
     def delete_endpoint(self, ctxt, endpoint_id):
         q_replicas_count = db_api.get_endpoint_replicas_count(
             ctxt, endpoint_id)
-        if q_replicas_count is not 0:
+        if q_replicas_count != 0:
             raise exception.NotAuthorized("%s replicas would be orphaned!" %
                                           q_replicas_count)
         db_api.delete_endpoint(ctxt, endpoint_id)