Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
csst-dfs
csst-dfs-api-local
Commits
9cb7f264
Commit
9cb7f264
authored
Jun 21, 2021
by
Wei Shoulin
Browse files
bugs
parent
5ab3235a
Changes
2
Hide whitespace changes
Inline
Side-by-side
csst_dfs_api_local/common/catalog.py
View file @
9cb7f264
...
...
@@ -22,7 +22,7 @@ class CatalogApi(object):
resp
=
json
.
loads
(
html
)
if
resp
[
"code"
]
==
0
:
return
Result
.
ok_data
(
data
=
from_dict_list
(
Gaia3Record
,
resp
[
"data"
])).
append
(
"totalCount"
,
resp
[
"object"
][
"totalCount"
])
return
Result
.
ok_data
(
data
=
from_dict_list
(
Gaia3Record
,
[]
if
resp
[
"data"
]
==
None
else
resp
[
"data"
])).
append
(
"totalCount"
,
resp
[
"object"
][
"totalCount"
])
else
:
return
Result
.
error
(
message
=
resp
[
'message'
])
...
...
csst_dfs_api_local/facility/observation.py
View file @
9cb7f264
...
...
@@ -165,7 +165,8 @@ class ObservationApi(object):
try
:
if
obs_id
==
0
:
r
=
self
.
db
.
select_one
(
"select max(id) as max_id from t_observation"
)
obs_id
=
r
[
"max_id"
]
+
1
max_id
=
0
if
r
[
"max_id"
]
is
None
else
r
[
"max_id"
]
obs_id
=
max_id
+
1
existed
=
self
.
db
.
exists
(
"select * from t_observation where id=?"
,
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment