Skip to content

Commit

Permalink
Don't add the protected info to the user data when importing tweet …
Browse files Browse the repository at this point in the history
…data

(a) because we can't get it from the downloaded archive https://twittercommunity.com/t/download-archive-does-not-include-current-protected-status/166622 and (b)
because that value should be set when saving the Account object, which
fetches the User data from Twitter before the import.

For #229
  • Loading branch information
philgyford committed Feb 14, 2022
1 parent 8015283 commit ebf375c
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 3 deletions.
2 changes: 0 additions & 2 deletions ditto/twitter/ingest.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,8 +281,6 @@ def _construct_user_data(self, directory):
"name": account_data[0]["account"]["accountDisplayName"],
"profile_image_url_https": profile_data[0]["profile"]["avatarMediaUrl"],
"verified": verified_data[0]["verified"]["verified"],
# TODO:
"protected": False,
# So that we don't mistake this for coming from the API when
# we save the JSON:
"ditto_note": (
Expand Down
1 change: 0 additions & 1 deletion tests/twitter/test_ingest_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ def test_saves_user_data(self):
"name": "Phil Gyford",
"profile_image_url_https": "https://pbs.twimg.com/profile_images/1167616130/james_200208_300x300.jpg", # NOQA: E501
"verified": False,
"protected": False,
"ditto_note": (
"This user data was compiled from separate parts of a "
"downloaded twitter archive by Django Ditto"
Expand Down

0 comments on commit ebf375c

Please sign in to comment.