Keep a move or a delete of chapters that the user makes during a job
A job placed each new chapter with the chapter order from its start, so a move by hand during the job went back. The store now places a new chapter against the order that the story has at that moment, in one transaction. A recheck of a chapter that the user deleted no longer stops the job.
This commit is contained in:
+1
-1
@@ -6,7 +6,7 @@ def test_chapters_revisions_and_rules(tmp_path):
|
||||
sid = store.create_story("https://example/s/1", "example", "T", "A", ["title"])
|
||||
c1 = store.add_chapter(sid, "u1", "One", "<p>1</p>", "h1", "new", 0)
|
||||
c2 = store.add_chapter(sid, "u2", "Two", "<p>2</p>", "h2", "new", 1)
|
||||
store.set_positions(sid, [c2, c1])
|
||||
store.reorder_chapters(sid, lambda order: [c2, c1])
|
||||
assert [c["url"] for c in store.chapters_for_build(sid)] == ["u2", "u1"]
|
||||
|
||||
assert store.add_revision(c1, "<p>1b</p>", "h1b", "recheck") == 2
|
||||
|
||||
Reference in New Issue
Block a user