revision logic revisited
This commit is contained in:
@@ -170,6 +170,15 @@ def add_link(
|
||||
""",
|
||||
(user_name, url_original, url_norm, site),
|
||||
)
|
||||
if tombstone:
|
||||
conn.execute(
|
||||
"""
|
||||
UPDATE links
|
||||
SET requires_revision = 0
|
||||
WHERE id = ?
|
||||
""",
|
||||
(cur.lastrowid,),
|
||||
)
|
||||
add_history(
|
||||
conn,
|
||||
user_name=user_name,
|
||||
@@ -198,7 +207,7 @@ def set_enabled(
|
||||
conn.execute(
|
||||
"""
|
||||
UPDATE links
|
||||
SET enabled = 1, disabled_at = NULL, updated_at = CURRENT_TIMESTAMP
|
||||
SET enabled = 1, disabled_at = NULL, requires_revision = 0, updated_at = CURRENT_TIMESTAMP
|
||||
WHERE id = ?
|
||||
""",
|
||||
(row["id"],),
|
||||
@@ -252,7 +261,7 @@ def set_banned(
|
||||
conn.execute(
|
||||
"""
|
||||
UPDATE links
|
||||
SET banned_at = NULL, banned_reason = NULL, updated_at = CURRENT_TIMESTAMP
|
||||
SET banned_at = NULL, banned_reason = NULL, requires_revision = 0, updated_at = CURRENT_TIMESTAMP
|
||||
WHERE id = ?
|
||||
""",
|
||||
(row["id"],),
|
||||
|
||||
Reference in New Issue
Block a user