Commit 17d83147 authored by Cristiano Urban's avatar Cristiano Urban
Browse files

Fixed bug in 'storageBasePathIsValid()' method.

parent 65004aaf
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -144,14 +144,14 @@ class DbConnector(object):
                WHERE position(base_path in cast(%s as varchar)) > 0;
                """, 
                (path,))
            result = self.cursor.fetchall()[0]["base_path"]
            result = self.cursor.fetchall()
            if result:
                return result
                return result[0]["base_path"]
            else:
                return False    
        
    def getStorageBasePath(self, storageId):
        """Returns the storage base path fro a give storage id"""
        """Returns the storage base path for a give storage id"""
        if self.conn:
            self.cursor.execute("SELECT base_path FROM storage WHERE storage_id = %s;", (storageId,))
            return self.cursor.fetchall()[0]["base_path"]