forked from MarseyWorld/MarseyWorld
dont delete the drafts themselves:
-- ppl can unabandon their effortposts more than 6 months later -- ppl cant see their deleted content on wpdmaster
parent
a8db05e1dc
commit
7edf9b0e43
|
@ -450,21 +450,19 @@ def _cleanup_videos():
|
||||||
)
|
)
|
||||||
for post in unpublished_drafts:
|
for post in unpublished_drafts:
|
||||||
print(f'draft post: {post.id}', flush=True)
|
print(f'draft post: {post.id}', flush=True)
|
||||||
post.deleted_utc = time.time()
|
|
||||||
g.db.add(post)
|
|
||||||
for media_usage in post.media_usages:
|
for media_usage in post.media_usages:
|
||||||
print(f'media usage: {media_usage.id}', flush=True)
|
if not media_usage.removed_utc:
|
||||||
media_usage.deleted_utc = post.deleted_utc
|
print(f'media usage: {media_usage.id}', flush=True)
|
||||||
g.db.add(media_usage)
|
media_usage.removed_utc = time.time()
|
||||||
|
g.db.add(media_usage)
|
||||||
|
|
||||||
for comment in post.comments:
|
for comment in post.comments:
|
||||||
print(f'draft comment: {comment.id}', flush=True)
|
print(f'draft comment: {comment.id}', flush=True)
|
||||||
comment.deleted_utc = time.time()
|
|
||||||
g.db.add(comment)
|
|
||||||
for media_usage in comment.media_usages:
|
for media_usage in comment.media_usages:
|
||||||
print(f'media usage: {media_usage.id}', flush=True)
|
if not media_usage.removed_utc:
|
||||||
media_usage.deleted_utc = comment.deleted_utc
|
print(f'media usage: {media_usage.id}', flush=True)
|
||||||
g.db.add(media_usage)
|
media_usage.removed_utc = time.time()
|
||||||
|
g.db.add(media_usage)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue