fix bug config should not set upper() case which ignored configs
This commit is contained in:
parent
db6d3a94a7
commit
bc3060085b
|
|
@ -79,7 +79,7 @@ def show_users(c, username="", details=False):
|
||||||
count = c.fetchone()[0]
|
count = c.fetchone()[0]
|
||||||
print(f"Username: {user[0]}, API Key: {user[1]}, Number of jobs: {count}")
|
print(f"Username: {user[0]}, API Key: {user[1]}, Number of jobs: {count}")
|
||||||
if details:
|
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()
|
result = c.fetchall()
|
||||||
print(result)
|
print(result)
|
||||||
else:
|
else:
|
||||||
|
|
@ -92,7 +92,7 @@ def show_users(c, username="", details=False):
|
||||||
count = c.fetchone()[0]
|
count = c.fetchone()[0]
|
||||||
print(f"Username: {user[0]}, API Key: {user[1]}, Number of jobs: {count}")
|
print(f"Username: {user[0]}, API Key: {user[1]}, Number of jobs: {count}")
|
||||||
if details:
|
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()
|
result = c.fetchall()
|
||||||
print(result)
|
print(result)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@ class Config:
|
||||||
for key in config:
|
for key in config:
|
||||||
if key not in OPTIONAL_KEYS:
|
if key not in OPTIONAL_KEYS:
|
||||||
continue
|
continue
|
||||||
self.__config[key.upper()] = config[key]
|
self.__config[key] = config[key]
|
||||||
return self
|
return self
|
||||||
|
|
||||||
def get_output_folder(self) -> str:
|
def get_output_folder(self) -> str:
|
||||||
|
|
|
||||||
|
|
@ -154,7 +154,7 @@ class Database:
|
||||||
columns = [UUID, KEY_JOB_STATUS] + REQUIRED_KEYS + OPTIONAL_KEYS
|
columns = [UUID, KEY_JOB_STATUS] + REQUIRED_KEYS + OPTIONAL_KEYS
|
||||||
for column in REQUIRED_KEYS + OPTIONAL_KEYS:
|
for column in REQUIRED_KEYS + OPTIONAL_KEYS:
|
||||||
values.append(job_dict.get(column, None))
|
values.append(job_dict.get(column, None))
|
||||||
|
|
||||||
query = f"INSERT INTO {HISTORY_TABLE_NAME} ({', '.join(columns)}) VALUES ({', '.join(['?' for _ in columns])})"
|
query = f"INSERT INTO {HISTORY_TABLE_NAME} ({', '.join(columns)}) VALUES ({', '.join(['?' for _ in columns])})"
|
||||||
self.__cursor.execute(query, tuple(values))
|
self.__cursor.execute(query, tuple(values))
|
||||||
self.__connect.commit()
|
self.__connect.commit()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue