Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
H
hivemind
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hive
hivemind
Commits
f600eb27
Commit
f600eb27
authored
4 years ago
by
Dariusz Kędzierski
Browse files
Options
Downloads
Patches
Plain Diff
Removed unused imports
parent
31e5c984
No related branches found
No related tags found
2 merge requests
!456
Release candidate v1 24
,
!364
Follower and following names validation and type check
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
hive/indexer/follow.py
+1
-4
1 addition, 4 deletions
hive/indexer/follow.py
with
1 addition
and
4 deletions
hive/indexer/follow.py
+
1
−
4
View file @
f600eb27
"""
Handles follow operations.
"""
"""
Handles follow operations.
"""
import
logging
import
logging
from
time
import
perf_counter
as
perf
from
json
import
dumps
from
funcy.seqs
import
first
from
funcy.seqs
import
first
from
hive.db.adapter
import
Db
from
hive.db.adapter
import
Db
from
hive.db.db_state
import
DbState
from
hive.utils.misc
import
chunks
from
hive.utils.misc
import
chunks
from
hive.indexer.accounts
import
Accounts
from
hive.indexer.accounts
import
Accounts
...
@@ -74,7 +71,7 @@ class Follow(DbAdapterHolder):
...
@@ -74,7 +71,7 @@ class Follow(DbAdapterHolder):
@classmethod
@classmethod
def
_validated_op
(
cls
,
account
,
op
,
date
):
def
_validated_op
(
cls
,
account
,
op
,
date
):
"""
Validate and normalize the operation.
"""
"""
Validate and normalize the operation.
"""
if
(
not
'
what
'
in
op
if
(
not
'
what
'
in
op
or
not
isinstance
(
op
[
'
what
'
],
list
)
or
not
isinstance
(
op
[
'
what
'
],
list
)
or
not
'
follower
'
in
op
or
not
'
follower
'
in
op
or
not
'
following
'
in
op
):
or
not
'
following
'
in
op
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment