update
This commit is contained in:
@@ -122,6 +122,10 @@ async def remove_bausteine(topic: str):
|
||||
async def create(req: GuideCreateRequest):
|
||||
if req.format != "OnePager" and not bausteine_path(req.topic.strip()).exists():
|
||||
raise HTTPException(400, "Erst Bausteine erstellen")
|
||||
# Kein Duplikat-Start: pro Thema+Format höchstens eine laufende Generierung
|
||||
for g in await list_guides():
|
||||
if g["topic"] == req.topic.strip() and g["format"] == req.format and g["status"] in ("queued", "generating"):
|
||||
raise HTTPException(409, "Generierung läuft bereits")
|
||||
await create_topic(req.topic.strip())
|
||||
now = datetime.now(timezone.utc).isoformat()
|
||||
guide = {
|
||||
|
||||
Reference in New Issue
Block a user