Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
G
gracedb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
99
Issues
99
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
1
Merge Requests
1
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Test Cases
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lscsoft
gracedb
Commits
6ef216e0
Commit
6ef216e0
authored
Jul 19, 2017
by
Tanner Prestegard
Committed by
gracedb-dev1
Jul 19, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adding O2VirgoTest search for HLV events during ER12
parent
b635135f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
0 deletions
+30
-0
gracedb/migrations/0022_add_O2VirgoTest_search.py
gracedb/migrations/0022_add_O2VirgoTest_search.py
+30
-0
No files found.
gracedb/migrations/0022_add_O2VirgoTest_search.py
0 → 100644
View file @
6ef216e0
# -*- coding: utf-8 -*-
from
__future__
import
unicode_literals
from
django.db
import
migrations
,
models
SEARCH
=
{
'name'
:
'O2VirgoTest'
,
'description'
:
'Testing 3-IFO pipelines for adding Virgo in O2'
}
def
add_search
(
apps
,
schema_editor
):
Search
=
apps
.
get_model
(
'gracedb'
,
'Search'
)
new_search
,
created
=
Search
.
objects
.
get_or_create
(
name
=
SEARCH
[
'name'
])
if
created
:
for
key
in
SEARCH
.
keys
():
setattr
(
new_search
,
key
,
SEARCH
[
key
])
new_search
.
save
()
def
remove_search
(
apps
,
schema_editor
):
Search
=
apps
.
get_model
(
'gracedb'
,
'Search'
)
Search
.
objects
.
get
(
name
=
SEARCH
[
'name'
]).
delete
()
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'gracedb'
,
'0021_event_offline'
),
]
operations
=
[
migrations
.
RunPython
(
add_search
,
remove_search
),
]
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