fix several bug
parent
45ad3ffc95
commit
07a5cfad09
|
|
@ -1032,7 +1032,10 @@ def infinite_image_browsing_api(app: FastAPI, **kwargs):
|
|||
if not path:
|
||||
raise HTTPException(400)
|
||||
path.alias = req.alias
|
||||
path.save(conn)
|
||||
try:
|
||||
path.save(conn)
|
||||
finally:
|
||||
conn.commit()
|
||||
return path
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -605,9 +605,10 @@ def open_file_with_default_app(file_path):
|
|||
def omit(d, keys):
|
||||
return {k: v for k, v in d.items() if k not in keys}
|
||||
|
||||
|
||||
def get_current_commit_hash():
|
||||
try:
|
||||
result = subprocess.run(['git', 'rev-parse', 'HEAD'], stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True)
|
||||
result = subprocess.run(['git', 'rev-parse', 'HEAD'], stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True, cwd=cwd)
|
||||
if result.returncode == 0:
|
||||
return result.stdout.strip()
|
||||
else:
|
||||
|
|
@ -617,7 +618,7 @@ def get_current_commit_hash():
|
|||
|
||||
def get_current_tag():
|
||||
try:
|
||||
result = subprocess.run(['git', 'describe', '--tags', '--abbrev=0'], stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True)
|
||||
result = subprocess.run(['git', 'describe', '--tags', '--abbrev=0'], stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True, cwd=cwd)
|
||||
if result.returncode == 0:
|
||||
return result.stdout.strip()
|
||||
else:
|
||||
|
|
|
|||
Loading…
Reference in New Issue