Browse Source

Deleted post cleanup: add missing fields

Some new fields have been added to comments and topics recently
(excerpt, original_url), but they weren't added to the cleanup script
yet. There was also no reason to keep information about whether the
posts had been edited or not.
merge-requests/53/head
Deimos 6 years ago
parent
commit
699df5f6d4
  1. 10
      tildes/scripts/clean_private_data.py

10
tildes/scripts/clean_private_data.py

@ -91,7 +91,13 @@ class DataCleaner:
Comment.user_id != 0,
)
.update(
{"user_id": 0, "markdown": "", "rendered_html": ""},
{
"user_id": 0,
"last_edited_time": None,
"markdown": "",
"rendered_html": "",
"excerpt": "",
},
synchronize_session=False,
)
)
@ -113,11 +119,13 @@ class DataCleaner:
.update(
{
"user_id": 0,
"last_edited_time": None,
"title": "",
"topic_type": "TEXT",
"markdown": None,
"rendered_html": None,
"link": None,
"original_url": None,
"content_metadata": None,
"_tags": [],
},

Loading…
Cancel
Save