Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to JiHu GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Chenhao Ma
core
Commits
f9d333ef
Commit
f9d333ef
authored
9 years ago
by
Gunnar Schaefer
Browse files
Options
Downloads
Patches
Plain Diff
adapt insert_one calls to new return value
parent
38d54b5f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
api/acquisitions.py
+1
-1
1 addition, 1 deletion
api/acquisitions.py
api/collections.py
+1
-1
1 addition, 1 deletion
api/collections.py
api/containers.py
+1
-1
1 addition, 1 deletion
api/containers.py
api/projects.py
+1
-1
1 addition, 1 deletion
api/projects.py
api/sessions.py
+1
-1
1 addition, 1 deletion
api/sessions.py
with
5 additions
and
5 deletions
api/acquisitions.py
+
1
−
1
View file @
f9d333ef
...
...
@@ -95,7 +95,7 @@ class Acquisitions(containers.ContainerList):
json_body
[
'
files
'
]
=
[]
if
'
timestamp
'
in
json_body
:
json_body
[
'
timestamp
'
]
=
util
.
parse_timestamp
(
json_body
[
'
timestamp
'
])
return
{
'
_id
'
:
str
(
self
.
dbc
.
insert_one
(
json_body
))}
return
{
'
_id
'
:
str
(
self
.
dbc
.
insert_one
(
json_body
)
.
inserted_id
)}
def
get
(
self
,
sid
):
"""
Return the list of Session Acquisitions.
"""
...
...
This diff is collapsed.
Click to expand it.
api/collections.py
+
1
−
1
View file @
f9d333ef
...
...
@@ -199,7 +199,7 @@ class Collections(containers.ContainerList):
json_body
[
'
curator
'
]
=
self
.
uid
json_body
[
'
timestamp
'
]
=
datetime
.
datetime
.
utcnow
()
json_body
[
'
permissions
'
]
=
[{
'
_id
'
:
self
.
uid
,
'
access
'
:
'
admin
'
}]
return
{
'
_id
'
:
str
(
self
.
dbc
.
insert_one
(
json_body
))}
return
{
'
_id
'
:
str
(
self
.
dbc
.
insert_one
(
json_body
)
.
inserted_id
)}
def
get
(
self
):
"""
Return the list of Collections.
"""
...
...
This diff is collapsed.
Click to expand it.
api/containers.py
+
1
−
1
View file @
f9d333ef
...
...
@@ -244,7 +244,7 @@ class Container(base.RequestHandler):
filepath
=
os
.
path
.
join
(
self
.
app
.
config
[
'
data_path
'
],
str
(
_id
)[
-
3
:]
+
'
/
'
+
str
(
_id
),
filename
)
if
self
.
request
.
GET
.
get
(
'
ticket
'
)
==
''
:
# request for download ticket
ticket
=
util
.
download_ticket
(
self
.
request
.
client_addr
,
'
file
'
,
_id
,
filename
,
fileinfo
[
'
filesize
'
])
return
{
'
ticket
'
:
self
.
app
.
db
.
downloads
.
insert_one
(
ticket
)}
return
{
'
ticket
'
:
self
.
app
.
db
.
downloads
.
insert_one
(
ticket
)
.
inserted_id
}
else
:
# authenticated or ticketed (unauthenticated) download
zip_member
=
self
.
request
.
GET
.
get
(
'
member
'
)
if
self
.
request
.
GET
.
get
(
'
info
'
,
''
).
lower
()
in
(
'
1
'
,
'
true
'
):
...
...
This diff is collapsed.
Click to expand it.
api/projects.py
+
1
−
1
View file @
f9d333ef
...
...
@@ -110,7 +110,7 @@ class Projects(containers.ContainerList):
json_body
[
'
public
'
]
=
json_body
.
get
(
'
public
'
,
False
)
json_body
[
'
files
'
]
=
[]
json_body
[
'
timestamp
'
]
=
datetime
.
datetime
.
utcnow
()
return
{
'
_id
'
:
str
(
self
.
dbc
.
insert_one
(
json_body
))}
return
{
'
_id
'
:
str
(
self
.
dbc
.
insert_one
(
json_body
)
.
inserted_id
)}
def
get
(
self
,
uid
=
None
,
gid
=
None
):
"""
Return the User
'
s list of Projects.
"""
...
...
This diff is collapsed.
Click to expand it.
api/sessions.py
+
1
−
1
View file @
f9d333ef
...
...
@@ -100,7 +100,7 @@ class Sessions(containers.ContainerList):
json_body
[
'
files
'
]
=
[]
if
'
timestamp
'
in
json_body
:
json_body
[
'
timestamp
'
]
=
util
.
parse_timestamp
(
json_body
[
'
timestamp
'
])
return
{
'
_id
'
:
str
(
self
.
dbc
.
insert_one
(
json_body
))}
return
{
'
_id
'
:
str
(
self
.
dbc
.
insert_one
(
json_body
)
.
inserted_id
)}
def
get
(
self
,
pid
=
None
,
gid
=
None
):
"""
Return the list of project or group sessions.
"""
...
...
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