Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
P
physical
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
钟尚武
physical
Commits
4cfeea81
Commit
4cfeea81
authored
Apr 19, 2019
by
段英荣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modify bug
parent
c2d4d186
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
register_user_tag.py
linucb/utils/register_user_tag.py
+4
-4
No files found.
linucb/utils/register_user_tag.py
View file @
4cfeea81
...
...
@@ -49,10 +49,10 @@ class RegisterUserTag(object):
tag_id
=
item
.
tag_id
user_id
=
item
.
user_id
user_tag_list
=
CommunityTagFollow
.
objects
.
filter
(
user_id
=
user_id
,
is_deleted
=
False
,
is_online
=
True
)
.
values_list
(
"tag_id"
,
flat
=
True
)
user_tag_list
=
list
(
CommunityTagFollow
.
objects
.
filter
(
user_id
=
user_id
,
is_deleted
=
False
,
is_online
=
True
)
.
values_list
(
"tag_id"
,
flat
=
True
)
)
user_id_dict
[
user_id
]
=
user_tag_list
user_register_tag_list
=
AccountUserTag
.
objects
.
filter
(
user
=
user_id
,
is_deleted
=
False
)
.
values_list
(
"tag_id"
,
flat
=
True
)
user_register_tag_list
=
list
(
AccountUserTag
.
objects
.
filter
(
user
=
user_id
,
is_deleted
=
False
)
.
values_list
(
"tag_id"
,
flat
=
True
)
)
user_id_dict
[
user_id
]
.
extend
(
user_register_tag_list
)
for
user_id
in
user_id_dict
:
...
...
@@ -77,10 +77,10 @@ class RegisterUserTag(object):
for
item
in
query_results
:
tag_id
=
item
.
tag_id
user_id
=
item
.
user
user_tag_list
=
AccountUserTag
.
objects
.
filter
(
user
=
user_id
)
.
values_list
(
"tag_id"
,
flat
=
True
)
user_tag_list
=
list
(
AccountUserTag
.
objects
.
filter
(
user
=
user_id
)
.
values_list
(
"tag_id"
,
flat
=
True
)
)
user_id_dict
[
user_id
]
=
user_tag_list
user_follow_tag_list
=
CommunityTagFollow
.
objects
.
filter
(
user_id
=
user_id
,
is_deleted
=
False
,
is_online
=
True
)
.
values_list
(
"tag_id"
,
flat
=
True
)
user_follow_tag_list
=
list
(
CommunityTagFollow
.
objects
.
filter
(
user_id
=
user_id
,
is_deleted
=
False
,
is_online
=
True
)
.
values_list
(
"tag_id"
,
flat
=
True
)
)
user_id_dict
[
user_id
]
.
extend
(
user_follow_tag_list
)
for
user_id
in
user_id_dict
:
...
...
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