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
8ed62dad
Commit
8ed62dad
authored
Aug 21, 2019
by
lixiaofang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add
parent
b7bfe8ac
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
pictorial.py
trans2es/models/pictorial.py
+2
-2
pictorial_transfer.py
trans2es/utils/pictorial_transfer.py
+1
-1
No files found.
trans2es/models/pictorial.py
View file @
8ed62dad
...
@@ -143,7 +143,7 @@ class Pictorial(models.Model):
...
@@ -143,7 +143,7 @@ class Pictorial(models.Model):
def
get_edit_tag_name
(
self
,
tag_id
):
def
get_edit_tag_name
(
self
,
tag_id
):
try
:
try
:
tag_name_list
=
list
(
tag_name_list
=
list
(
Tag
.
objects
.
filter
(
id__in
=
tag_id
,
is_online
=
True
,
is_collection
=
1
)
.
values_list
(
"name"
,
flat
=
True
))
Tag
.
objects
.
filter
(
id__in
=
tag_id
,
is_online
=
True
)
.
values_list
(
"name"
,
flat
=
True
))
return
tag_name_list
return
tag_name_list
except
:
except
:
...
@@ -271,7 +271,7 @@ class Pictorial(models.Model):
...
@@ -271,7 +271,7 @@ class Pictorial(models.Model):
PictorialTopics
.
objects
.
filter
(
pictorial_id
=
self
.
id
,
is_online
=
True
,
is_deleted
=
False
)
.
values_list
(
PictorialTopics
.
objects
.
filter
(
pictorial_id
=
self
.
id
,
is_online
=
True
,
is_deleted
=
False
)
.
values_list
(
"topic_id"
,
flat
=
True
))
"topic_id"
,
flat
=
True
))
topic_info
=
Topic
.
objects
.
filter
(
id__in
=
topic_id_list
)
.
values
(
"user_id"
,
"create_time"
)
topic_info
=
Topic
.
objects
.
filter
(
id__in
=
topic_id_list
,
is_online
=
1
)
.
values
(
"user_id"
,
"create_time"
)
if
topic_info
.
count
()
>
0
:
if
topic_info
.
count
()
>
0
:
for
topic
in
topic_info
:
for
topic
in
topic_info
:
...
...
trans2es/utils/pictorial_transfer.py
View file @
8ed62dad
...
@@ -74,7 +74,7 @@ class PictorialTransfer(object):
...
@@ -74,7 +74,7 @@ class PictorialTransfer(object):
res
[
"latest_real_topic_time"
]
=
instance
.
get_latest_real_topic_time
()
res
[
"latest_real_topic_time"
]
=
instance
.
get_latest_real_topic_time
()
res
[
"real_user_activate_time"
]
=
instance
.
get_real_user_activate_time
()
res
[
"real_user_activate_time"
]
=
instance
.
get_real_user_activate_time
()
res
[
"edit_tag_id"
]
=
instance
.
get_edit_tag_id
()
res
[
"edit_tag_id"
]
=
instance
.
get_edit_tag_id
()
res
[
"edit_tag_name"
]
=
instance
.
get_edit_tag_name
()
res
[
"edit_tag_name"
]
=
instance
.
get_edit_tag_name
(
res
[
"edit_tag_id"
]
)
logging
.
info
(
"get data:
%
s"
%
res
)
logging
.
info
(
"get data:
%
s"
%
res
)
return
res
return
res
except
:
except
:
...
...
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