Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
lscsoft
gracedb
Commits
7d81562d
Commit
7d81562d
authored
Jun 19, 2019
by
Tanner Prestegard
Committed by
GraceDB
Jun 26, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove useless Approval model
parent
2554f781
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
16 deletions
+26
-16
gracedb/events/migrations/0037_delete_approval_model.py
gracedb/events/migrations/0037_delete_approval_model.py
+26
-0
gracedb/events/models.py
gracedb/events/models.py
+0
-16
No files found.
gracedb/events/migrations/0037_delete_approval_model.py
0 → 100644
View file @
7d81562d
# -*- coding: utf-8 -*-
# Generated by Django 1.11.20 on 2019-06-19 21:45
from
__future__
import
unicode_literals
from
django.db
import
migrations
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'events'
,
'0036_populate_voevent_fields'
),
]
operations
=
[
migrations
.
RemoveField
(
model_name
=
'approval'
,
name
=
'approvedEvent'
,
),
migrations
.
RemoveField
(
model_name
=
'approval'
,
name
=
'approver'
,
),
migrations
.
DeleteModel
(
name
=
'Approval'
,
),
]
gracedb/events/models.py
View file @
7d81562d
...
@@ -263,12 +263,6 @@ class Event(models.Model):
...
@@ -263,12 +263,6 @@ class Event(models.Model):
else
:
else
:
return
'Production'
return
'Production'
def
ligoApproved
(
self
):
return
self
.
approval_set
.
filter
(
approvingCollaboration
=
'L'
).
count
()
def
virgoApproved
(
self
):
return
self
.
approval_set
.
filter
(
approvingCollaboration
=
'V'
).
count
()
def
reportingLatency
(
self
):
def
reportingLatency
(
self
):
if
self
.
gpstime
:
if
self
.
gpstime
:
dt
=
self
.
created
dt
=
self
.
created
...
@@ -616,17 +610,7 @@ class Labelling(m2mThroughBase):
...
@@ -616,17 +610,7 @@ class Labelling(m2mThroughBase):
label
=
self
.
label
.
name
)
label
=
self
.
label
.
name
)
# XXX Deprecated? Is this used *anywhere*?
# Appears to only be used in models.py. Here and Event class as approval_set
class
Approval
(
models
.
Model
):
COLLABORATION_CHOICES
=
(
(
'L'
,
'LIGO'
),
(
'V'
,
'Virgo'
),
)
approver
=
models
.
ForeignKey
(
UserModel
)
created
=
models
.
DateTimeField
(
auto_now_add
=
True
)
approvedEvent
=
models
.
ForeignKey
(
Event
,
null
=
False
)
approvingCollaboration
=
models
.
CharField
(
max_length
=
1
,
choices
=
COLLABORATION_CHOICES
)
## Analysis Specific Attributes.
## Analysis Specific Attributes.
class
GrbEvent
(
Event
):
class
GrbEvent
(
Event
):
ivorn
=
models
.
CharField
(
max_length
=
200
,
null
=
True
)
ivorn
=
models
.
CharField
(
max_length
=
200
,
null
=
True
)
author_ivorn
=
models
.
CharField
(
max_length
=
200
,
null
=
True
)
author_ivorn
=
models
.
CharField
(
max_length
=
200
,
null
=
True
)
...
...
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