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
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
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 GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Michael Coughlin
GraceDB Server
Commits
3feb668a
Commit
3feb668a
authored
4 years ago
by
Alexander Pace
Browse files
Options
Downloads
Patches
Plain Diff
updated nicknaming
parent
d8d207af
Branches
new_event_superevent_types
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
gracedb/api/v1/superevents/serializers.py
+1
-1
1 addition, 1 deletion
gracedb/api/v1/superevents/serializers.py
gracedb/events/migrations/0056_nickname.py
+1
-4
1 addition, 4 deletions
gracedb/events/migrations/0056_nickname.py
gracedb/events/models.py
+2
-2
2 additions, 2 deletions
gracedb/events/models.py
with
4 additions
and
7 deletions
gracedb/api/v1/superevents/serializers.py
+
1
−
1
View file @
3feb668a
...
...
@@ -407,7 +407,7 @@ class SupereventNicknameSerializer(serializers.ModelSerializer):
class
Meta
:
model
=
Nickname
fields
=
(
'
self
'
,
'
name
'
,
'
created
'
,
'
creator
'
)
fields
=
(
'
self
'
,
'
name
'
,
'
created
'
,
'
creator
'
,
'
comment
'
)
def
get_self
(
self
,
obj
):
return
api_reverse
(
'
superevents:superevent-nickname-detail
'
,
args
=
[
...
...
This diff is collapsed.
Click to expand it.
gracedb/events/migrations/0056_nickname.py
+
1
−
4
View file @
3feb668a
# Generated by Django 2.2.10 on 2020-1
0-29 18:37
# Generated by Django 2.2.10 on 2020-1
1-02 23:14
from
django.conf
import
settings
from
django.db
import
migrations
,
models
...
...
@@ -25,8 +25,5 @@ class Migration(migrations.Migration):
(
'
content_type
'
,
models
.
ForeignKey
(
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
to
=
'
contenttypes.ContentType
'
)),
(
'
creator
'
,
models
.
ForeignKey
(
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
to
=
settings
.
AUTH_USER_MODEL
)),
],
options
=
{
'
unique_together
'
:
{(
'
object_id
'
,
'
content_type
'
)},
},
),
]
This diff is collapsed.
Click to expand it.
gracedb/events/models.py
+
2
−
2
View file @
3feb668a
...
...
@@ -179,8 +179,8 @@ class Nickname(models.Model):
def
natural_key
(
self
):
return
self
.
name
class
Meta
():
unique_together
=
[(
'
object_id
'
,
'
content_type
'
)]
#
class Meta():
#
unique_together = [('object_id', 'content_type')]
def
__str__
(
self
):
return
self
.
name
...
...
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