Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
GraceDB Server
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
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 GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
IGWN Computing and Software
GraceDB
GraceDB Server
Commits
ac35e98e
Commit
ac35e98e
authored
11 years ago
by
Branson Stephens
Browse files
Options
Downloads
Patches
Plain Diff
fixed file upload through REST api to document with log message.
parent
7e58e546
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
gracedb/api.py
+10
-7
10 additions, 7 deletions
gracedb/api.py
with
10 additions
and
7 deletions
gracedb/api.py
+
10
−
7
View file @
ac35e98e
...
@@ -348,12 +348,6 @@ class EventList(APIView):
...
@@ -348,12 +348,6 @@ class EventList(APIView):
parser_classes
=
(
parsers
.
MultiPartParser
,)
parser_classes
=
(
parsers
.
MultiPartParser
,)
renderer_classes
=
(
JSONRenderer
,
BrowsableAPIRenderer
,
LigoLwRenderer
,
TSVRenderer
,)
renderer_classes
=
(
JSONRenderer
,
BrowsableAPIRenderer
,
LigoLwRenderer
,
TSVRenderer
,)
# XXX Branson, remember to get rid of this.
def
__init__
(
self
,
**
kwargs
):
# Try to define the logger in here.
self
.
logger
=
logging
.
getLogger
(
__name__
)
super
(
EventList
,
self
).
__init__
(
**
kwargs
)
def
get
(
self
,
request
,
*
args
,
**
kwargs
):
def
get
(
self
,
request
,
*
args
,
**
kwargs
):
"""
I am the GET docstring for EventList
"""
"""
I am the GET docstring for EventList
"""
...
@@ -1377,7 +1371,16 @@ class Files(APIView):
...
@@ -1377,7 +1371,16 @@ class Files(APIView):
# XXX This needs some thought.
# XXX This needs some thought.
response
=
Response
(
str
(
e
),
status
=
status
.
HTTP_400_BAD_REQUEST
)
response
=
Response
(
str
(
e
),
status
=
status
.
HTTP_400_BAD_REQUEST
)
# XXX Branson: need to create log entry here.
# Create a log entry to document the file upload.
logentry
=
EventLog
(
event
=
event
,
issuer
=
request
.
user
,
comment
=
''
,
filename
=
filename
)
try
:
logentry
.
save
()
except
:
# XXX something should be done here.
pass
try
:
try
:
description
=
"
UPLOAD: {0}
"
.
format
(
filename
)
description
=
"
UPLOAD: {0}
"
.
format
(
filename
)
...
...
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