diff --git a/manage.py b/manage.py index a429f73..61fb1a2 100644 --- a/manage.py +++ b/manage.py @@ -79,7 +79,7 @@ def show_users(c, username="", details=False): count = c.fetchone()[0] print(f"Username: {user[0]}, API Key: {user[1]}, Number of jobs: {count}") if details: - c.execute("SELECT * FROM history WHERE apikey=?", (user[1],)) + c.execute("SELECT uuid, created_at, type, status, width, height, steps FROM history WHERE apikey=?", (user[1],)) result = c.fetchall() print(result) else: @@ -92,7 +92,7 @@ def show_users(c, username="", details=False): count = c.fetchone()[0] print(f"Username: {user[0]}, API Key: {user[1]}, Number of jobs: {count}") if details: - c.execute("SELECT * FROM history WHERE apikey=?", (user[1],)) + c.execute("SELECT uuid, created_at, type, status, width, height, steps FROM history WHERE apikey=?", (user[1],)) result = c.fetchall() print(result) diff --git a/utilities/config.py b/utilities/config.py index 1526668..58d44e5 100644 --- a/utilities/config.py +++ b/utilities/config.py @@ -43,7 +43,7 @@ class Config: for key in config: if key not in OPTIONAL_KEYS: continue - self.__config[key.upper()] = config[key] + self.__config[key] = config[key] return self def get_output_folder(self) -> str: diff --git a/utilities/database.py b/utilities/database.py index c2a05a9..92ece74 100644 --- a/utilities/database.py +++ b/utilities/database.py @@ -154,7 +154,7 @@ class Database: columns = [UUID, KEY_JOB_STATUS] + REQUIRED_KEYS + OPTIONAL_KEYS for column in REQUIRED_KEYS + OPTIONAL_KEYS: values.append(job_dict.get(column, None)) - + query = f"INSERT INTO {HISTORY_TABLE_NAME} ({', '.join(columns)}) VALUES ({', '.join(['?' for _ in columns])})" self.__cursor.execute(query, tuple(values)) self.__connect.commit()