Compare commits
No commits in common. "9f58682689a6073bc9a937a679e1f37024181d93" and "9959c7dec2cd5fbce23990131958876592870736" have entirely different histories.
9f58682689
...
9959c7dec2
1 changed files with 3 additions and 8 deletions
|
|
@ -7,7 +7,6 @@ import glob as _glob
|
|||
import logging
|
||||
import mimetypes
|
||||
import shutil
|
||||
import sqlite3
|
||||
import subprocess
|
||||
import sys
|
||||
import time
|
||||
|
|
@ -446,13 +445,9 @@ def create_project_link(body: ProjectLinkCreate):
|
|||
if not models.get_project(conn, body.to_project):
|
||||
conn.close()
|
||||
raise HTTPException(404, f"Project '{body.to_project}' not found")
|
||||
try:
|
||||
link = models.create_project_link(
|
||||
conn, body.from_project, body.to_project, body.type, body.description
|
||||
)
|
||||
except sqlite3.IntegrityError:
|
||||
conn.close()
|
||||
raise HTTPException(409, "Link already exists")
|
||||
conn.close()
|
||||
return link
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue