Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
S
shadowban-eu-backend
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
shadowban-eu-backend
Commits
fe1ab63e
Commit
fe1ab63e
authored
Dec 26, 2020
by
Raphael Beer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix: failing sensitives counting when user is not exising/protected
parent
6e852ffc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
tests/profile.py
tests/profile.py
+5
-5
No files found.
tests/profile.py
View file @
fe1ab63e
...
...
@@ -27,13 +27,11 @@ async def test(session, username: str) -> Tuple[str, Dict[str, Any]]:
profile
[
"screen_name"
]
=
username
try
:
profile
[
"restriction"
]
=
profile_raw
[
"profile_interstitial_type"
]
if
profile_raw
[
"profile_interstitial_type"
]
!=
""
:
profile
[
"restriction"
]
=
profile_raw
[
"profile_interstitial_type"
]
except
KeyError
:
pass
if
profile
.
get
(
"restriction"
,
None
)
==
""
:
del
profile
[
"restriction"
]
try
:
profile
[
"protected"
]
=
profile_raw
[
"protected"
]
except
KeyError
:
...
...
@@ -50,6 +48,8 @@ async def test(session, username: str) -> Tuple[str, Dict[str, Any]]:
except
KeyError
:
profile
[
"has_tweets"
]
=
False
profile
[
"sensitives"
]
=
await
count_sensitives
(
session
,
user_id
)
if
profile
[
"exists"
]
and
not
profile
.
get
(
"protected"
,
False
):
profile
[
"sensitives"
]
=
await
count_sensitives
(
session
,
user_id
)
return
user_id
,
profile
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment