Commit f51a2ae7 authored by Cristiano Urban's avatar Cristiano Urban
Browse files

Included 'baseUrl' in 'insertStorage()' method.

parent 4251d35f
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -461,19 +461,21 @@ class DbConnector(object):

    ##### Storage #####

    def insertStorage(self, storageType, basePath, hostname):
    def insertStorage(self, storageType, basePath, baseUrl, hostname):
        """Inserts a storage point."""
        if self.conn:
            if not self.getStorageId(basePath):
                self.cursor.execute("""
                    INSERT INTO storage(storage_type,
                                        base_path,
                                        base_url,
                                        hostname)
                    VALUES (%s, %s, %s)
                    VALUES (%s, %s, %s, %s)
                    RETURNING storage_id;
                    """,
                    (storageType,
                     basePath,
                     baseUrl,
                     hostname,))

                storageSrcId = self.cursor.fetchall()[0]["storage_id"]