Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
DA-Platform
Overview
Overview
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
Berlin
DA-Platform
Commits
70915b81
Commit
70915b81
authored
Jun 22, 2020
by
convivae
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
image后端基本完成
parent
519a7faa
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
Image.py
DAPlatform/dao/Image.py
+3
-2
No files found.
DAPlatform/dao/Image.py
View file @
70915b81
...
...
@@ -207,7 +207,7 @@ def getImage(relation_list):
try
:
image_list
=
Image
.
objects
(
relationId__in
=
relation_list
)
data
=
[
json
.
dumps
(
image
.
to_json
(),
ensure_ascii
=
False
)
for
image
in
image_list
]
return
Result
(
1
,
len
(
image_list
),
data
)
return
Result
(
1
,
len
(
image_list
),
{
"imageList"
:
data
}
)
except
Exception
as
e
:
traceback
.
print_exc
()
return
Result
(
0
,
repr
(
e
),
{})
...
...
@@ -230,7 +230,8 @@ def getLayer(relation_list):
landmark_list
=
Landmark
.
objects
(
relationId__in
=
relation_list
)
layer_data
=
[
json
.
dumps
(
layer
.
to_json
(),
ensure_ascii
=
False
)
for
layer
in
layer_list
]
landmark_data
=
[
json
.
dumps
(
landmark
.
to_json
(),
ensure_ascii
=
False
)
for
landmark
in
landmark_list
]
return
Result
(
1
,
[
"layers:"
,
len
(
layer_data
),
"landmarks:"
,
len
(
landmark_data
)],
[
layer_data
,
landmark_data
])
return
Result
(
1
,
[
"layers:"
,
len
(
layer_data
),
"landmarks:"
,
len
(
landmark_data
)],
{
"layerList"
:
layer_data
,
"landmarkList"
:
landmark_data
})
except
Exception
as
e
:
traceback
.
print_exc
()
return
Result
(
0
,
repr
(
e
),
{})
...
...
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