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
27b5d328
Commit
27b5d328
authored
10 years ago
by
Branson Craig Stephens
Browse files
Options
Downloads
Patches
Plain Diff
Fixed two small bugs associated with the single inspiral tables.
parent
91be6c3b
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
gracedb/models.py
+5
-1
5 additions, 1 deletion
gracedb/models.py
gracedb/translator.py
+3
-2
3 additions, 2 deletions
gracedb/translator.py
with
8 additions
and
3 deletions
gracedb/models.py
+
5
−
1
View file @
27b5d328
...
@@ -751,7 +751,11 @@ class SingleInspiral(models.Model):
...
@@ -751,7 +751,11 @@ class SingleInspiral(models.Model):
e
=
cls
(
event
=
event
)
e
=
cls
(
event
=
event
)
#log.debug("Single/creating event")
#log.debug("Single/creating event")
for
column
in
field_names
:
for
column
in
field_names
:
value
=
getattr
(
row
,
column
)
try
:
value
=
getattr
(
row
,
column
)
except
:
# We don't want to fail if the value is not present.
value
=
None
#log.debug("Setting column '%s' with value '%s'" % (column, value))
#log.debug("Setting column '%s' with value '%s'" % (column, value))
setattr
(
e
,
column
,
value
)
setattr
(
e
,
column
,
value
)
e
.
save
()
e
.
save
()
...
...
This diff is collapsed.
Click to expand it.
gracedb/translator.py
+
3
−
2
View file @
27b5d328
...
@@ -19,8 +19,6 @@ from utils.vfile import VersionedFile
...
@@ -19,8 +19,6 @@ from utils.vfile import VersionedFile
import
json
import
json
import
logging
use_in
(
LIGOLWContentHandler
)
use_in
(
LIGOLWContentHandler
)
# This function checks for 'inf' in a float field, asks the database
# This function checks for 'inf' in a float field, asks the database
...
@@ -166,6 +164,9 @@ def handle_uploaded_data(event, datafilename,
...
@@ -166,6 +164,9 @@ def handle_uploaded_data(event, datafilename,
# Extract Single Inspiral Information
# Extract Single Inspiral Information
s_inspiral_table
=
SnglInspiralTable
.
get_table
(
xmldoc
)
s_inspiral_table
=
SnglInspiralTable
.
get_table
(
xmldoc
)
# If this is a replacement, we might already have single inspiral tables
# associated. So we should re-create them.
event
.
singleinspiral_set
.
all
().
delete
()
SingleInspiral
.
create_events_from_ligolw_table
(
s_inspiral_table
,
event
)
SingleInspiral
.
create_events_from_ligolw_table
(
s_inspiral_table
,
event
)
elif
pipeline
==
'
HardwareInjection
'
:
elif
pipeline
==
'
HardwareInjection
'
:
...
...
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